refactor: more analysis errors

pull/115/head
RuiAlonso 4 years ago
parent 0cb24ee3f9
commit e4bc79a46c

@ -66,9 +66,13 @@ class PinballGame extends Forge2DGame
Future<void> _addGameBoundaries() async {
await add(BottomWall());
createBoundaries(this).forEach(add);
unawaited(addFromBlueprint(DinoWalls(
unawaited(
addFromBlueprint(
DinoWalls(
position: Vector2(-2.4, 0),
)));
),
),
);
}
Future<void> _addPlunger() async {

@ -1,48 +0,0 @@
import 'package:flame_forge2d/flame_forge2d.dart';
import 'package:flame_test/flame_test.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pinball_components/pinball_components.dart';
import '../../helpers/helpers.dart';
void main() {
group('DinoTopWall', () {
final tester = FlameTester(TestGame.new);
tester.testGameWidget(
'renders correctly',
setUp: (game, tester) async {
await game.add(DinoTopWall()..initialPosition = Vector2(0, -50));
await game.ready();
await tester.pump();
},
verify: (game, tester) async {
// FIXME(ruimiguel): Failing pipeline.
//await expectLater(
// find.byGame<Forge2DGame>(),
// matchesGoldenFile('golden/dinoTopWall.png'),
//);
},
);
});
group('DinoBottomWall', () {
final tester = FlameTester(TestGame.new);
tester.testGameWidget(
'renders correctly',
setUp: (game, tester) async {
await game.add(DinoBottomWall()..initialPosition = Vector2(0, -12));
await game.ready();
await tester.pump();
},
verify: (game, tester) async {
// FIXME(ruimiguel): Failing pipeline.
//await expectLater(
// find.byGame<Forge2DGame>(),
// matchesGoldenFile('golden/dinoBottomWall.png'),
//);
},
);
});
}
Loading…
Cancel
Save