test: fix failing tests

pull/93/head
Allison Ryan 4 years ago
parent e86ee228a8
commit 24f542e222

@ -38,7 +38,7 @@ void main() {
group('can be moved', () { group('can be moved', () {
flameTester.test('by its weight', (game) async { flameTester.test('by its weight', (game) async {
final ball = Ball(); final ball = Ball()..initialPosition = Vector2(0, 10);
await game.ensureAdd(ball); await game.ensureAdd(ball);
game.update(1); game.update(1);
@ -46,7 +46,7 @@ void main() {
}); });
flameTester.test('by applying velocity', (game) async { flameTester.test('by applying velocity', (game) async {
final ball = Ball(); final ball = Ball()..initialPosition = Vector2(0, 10);
await game.ensureAdd(ball); await game.ensureAdd(ball);
ball.body.gravityScale = 0; ball.body.gravityScale = 0;
@ -201,7 +201,7 @@ void main() {
flameTester.test( flameTester.test(
'by its weight when previously stopped', 'by its weight when previously stopped',
(game) async { (game) async {
final ball = Ball(); final ball = Ball()..initialPosition = Vector2(0, 10);
await game.ensureAdd(ball); await game.ensureAdd(ball);
ball.stop(); ball.stop();
ball.resume(); ball.resume();
@ -214,7 +214,7 @@ void main() {
flameTester.test( flameTester.test(
'by applying velocity when previously stopped', 'by applying velocity when previously stopped',
(game) async { (game) async {
final ball = Ball(); final ball = Ball()..initialPosition = Vector2(0, 10);
await game.ensureAdd(ball); await game.ensureAdd(ball);
ball.stop(); ball.stop();
ball.resume(); ball.resume();

@ -187,7 +187,7 @@ void main() {
final fixture = bonusLetter.body.fixtures[0]; final fixture = bonusLetter.body.fixtures[0];
expect(fixture.shape.shapeType, equals(ShapeType.circle)); expect(fixture.shape.shapeType, equals(ShapeType.circle));
expect(fixture.shape.radius, equals(2)); expect(fixture.shape.radius, equals(1.85));
}, },
); );
}); });

Loading…
Cancel
Save