From 3d60442128c74e18cc0330c8f8907a2377608b3c Mon Sep 17 00:00:00 2001 From: RuiAlonso Date: Wed, 16 Mar 2022 14:32:46 +0100 Subject: [PATCH] test: coverage --- test/game/components/layer_test.dart | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/test/game/components/layer_test.dart b/test/game/components/layer_test.dart index 233d9683..aed5a49a 100644 --- a/test/game/components/layer_test.dart +++ b/test/game/components/layer_test.dart @@ -135,7 +135,8 @@ void main() { ); group('fixture', () { - const layer = Layer.jetpack; + const pathwayLayer = Layer.jetpack; + const openingLayer = Layer.opening; flameTester.test( 'exists', @@ -143,8 +144,8 @@ void main() { final ramp = TestRampOpening( position: Vector2.zero(), orientation: RampOrientation.down, - pathwayLayer: layer, - openingLayer: layer, + pathwayLayer: pathwayLayer, + openingLayer: openingLayer, ); await game.ensureAdd(ramp); @@ -158,8 +159,8 @@ void main() { final ramp = TestRampOpening( position: Vector2.zero(), orientation: RampOrientation.down, - pathwayLayer: layer, - openingLayer: layer, + pathwayLayer: pathwayLayer, + openingLayer: openingLayer, ); await game.ensureAdd(ramp); @@ -174,8 +175,8 @@ void main() { final ramp = TestRampOpening( position: Vector2.zero(), orientation: RampOrientation.down, - pathwayLayer: layer, - openingLayer: layer, + pathwayLayer: pathwayLayer, + openingLayer: openingLayer, ); await game.ensureAdd(ramp); @@ -190,8 +191,8 @@ void main() { final ramp = TestRampOpening( position: Vector2.zero(), orientation: RampOrientation.down, - pathwayLayer: layer, - openingLayer: layer, + pathwayLayer: pathwayLayer, + openingLayer: openingLayer, ); await game.ensureAdd(ramp); @@ -199,7 +200,7 @@ void main() { final fixture = ramp.body.fixtures[0]; expect( fixture.filterData.categoryBits, - equals(layer.maskBits), + equals(ramp.openingLayer.maskBits), ); }, );