diff --git a/packages/flame/test/components/position_component_test.dart b/packages/flame/test/components/position_component_test.dart index 38d3e072c4c..c63b2995136 100644 --- a/packages/flame/test/components/position_component_test.dart +++ b/packages/flame/test/components/position_component_test.dart @@ -298,17 +298,6 @@ void main() { expect(component.containsPoint(point), false); }); - test('component with zero size does not contain point', () { - final component = PositionComponent(); - component.position.setValues(2.0, 2.0); - component.size.setValues(0.0, 0.0); - component.angle = 0.0; - component.anchor = Anchor.center; - - final point = Vector2(2.0, 2.0); - expect(component.containsPoint(point), false); - }); - test('scaled component contains point', () { final component = PositionComponent(); component.anchor = Anchor.center; diff --git a/packages/flame/test/components/priority_test.dart b/packages/flame/test/components/priority_test.dart index aacc38a34dd..47d062c9f0b 100644 --- a/packages/flame/test/components/priority_test.dart +++ b/packages/flame/test/components/priority_test.dart @@ -23,23 +23,6 @@ void main() { }, ); - testWithFlameGame( - 'changing priority should reorder component list', - (game) async { - final firstComponent = _PriorityComponent(-1); - final priorityComponents = List.generate(10, _PriorityComponent.new) - ..add(firstComponent); - priorityComponents.shuffle(); - final components = game.world.children; - await game.world.ensureAddAll(priorityComponents); - componentsSorted(components); - expect(components.first, firstComponent); - firstComponent.priority = 11; - game.update(0); - expect(components.last, firstComponent); - }, - ); - testWithFlameGame( 'changing priority with the priority setter should reorder the list', (game) async { diff --git a/packages/flame/test/components/text_box_component_test.dart b/packages/flame/test/components/text_box_component_test.dart index f158f5dfd5b..2fe583d7562 100644 --- a/packages/flame/test/components/text_box_component_test.dart +++ b/packages/flame/test/components/text_box_component_test.dart @@ -5,7 +5,6 @@ import 'package:flame/components.dart'; import 'package:flame/palette.dart'; import 'package:flame_test/flame_test.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; void main() { group('TextBoxComponent', () { @@ -122,26 +121,6 @@ void main() { }, ); - testWithFlameGame( - 'onComplete is called when no scrolling is required', - (game) async { - final onComplete = _MockOnCompleteCallback(); - - when(onComplete.call).thenReturn(null); - - final component = ScrollTextBoxComponent( - size: Vector2(200, 100), - text: 'Short text', - onComplete: onComplete.call, - ); - await game.ensureAdd(component); - - game.update(0.1); - - verify(onComplete.call).called(1); - }, - ); - testWithFlameGame( 'TextBoxComponent notifies if a new line is added and requires space', (game) async { @@ -254,7 +233,3 @@ class _FramedTextBox extends TextBoxComponent { super.render(canvas); } } - -class _MockOnCompleteCallback extends Mock { - void call(); -} diff --git a/packages/flame/test/extensions/vector2_test.dart b/packages/flame/test/extensions/vector2_test.dart index 69f337744c2..e0d80caf4a2 100644 --- a/packages/flame/test/extensions/vector2_test.dart +++ b/packages/flame/test/extensions/vector2_test.dart @@ -291,12 +291,6 @@ void main() { }); group('inversion', () { - test('invert', () { - final v = Vector2.all(1); - v.invert(); - expect(v, Vector2.all(-1)); - }); - test('inverted', () { final v = Vector2.all(1); final w = v.inverted(); diff --git a/packages/flame/test/game/game_widget/game_widget_test.dart b/packages/flame/test/game/game_widget/game_widget_test.dart index dd5c56e380a..8ae3c0200b0 100644 --- a/packages/flame/test/game/game_widget/game_widget_test.dart +++ b/packages/flame/test/game/game_widget/game_widget_test.dart @@ -348,38 +348,6 @@ void main() { expect(gameFocusNode.hasPrimaryFocus, isTrue); }, ); - - testWidgets('autofocus on overlay', (tester) async { - final gameFocusNode = FocusNode(); - final overlayFocusNode = FocusNode(); - - final game = FlameGame(); - - await tester.pumpWidget( - GameWidget( - focusNode: gameFocusNode, - game: game, - autofocus: false, - initialActiveOverlays: const ['some-overlay'], - overlayBuilderMap: { - 'some-overlay': (buildContext, game) { - return Focus( - focusNode: overlayFocusNode, - autofocus: true, - child: const SizedBox.shrink(), - ); - }, - }, - ), - ); - - await game.toBeLoaded(); - await tester.pump(); - - expect(gameFocusNode.hasPrimaryFocus, isFalse); - expect(gameFocusNode.hasFocus, isTrue); - expect(overlayFocusNode.hasPrimaryFocus, isTrue); - }); }); }); @@ -422,24 +390,6 @@ void main() { }, ); - testWidgets('handles keys when KeyboardEvents', (tester) async { - final game = _GameWithKeyboardEvents(); - - await tester.pumpWidget( - GameWidget( - game: game, - ), - ); - - await game.toBeLoaded(); - await tester.pump(); - - await simulateKeyDownEvent(LogicalKeyboardKey.keyA); - await tester.pump(); - - expect(game.keyEvents, [LogicalKeyboardKey.keyA]); - }); - testWidgets('overlay handles keys', (tester) async { final overlayKeyEvents = []; final overlayFocusNode = FocusNode(