File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
packages/flutter/test/services Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import 'package:flutter/foundation.dart';
88import 'package:flutter/painting.dart' ;
99import 'package:flutter/services.dart' ;
1010import 'package:flutter_test/flutter_test.dart' ;
11+ import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart' ;
1112
1213class TestAssetBundle extends CachingAssetBundle {
1314 Map <String , int > loadCallCount = < String , int > {};
@@ -135,7 +136,7 @@ void main() {
135136 expect (await data, 1 );
136137 });
137138
138- testWidgets ('loadStructuredData handles exceptions correctly' , (WidgetTester tester) async {
139+ testWidgetsWithLeakTracking ('loadStructuredData handles exceptions correctly' , (WidgetTester tester) async {
139140 final TestAssetBundle bundle = TestAssetBundle ();
140141 try {
141142 await bundle.loadStructuredData ('AssetManifest.json' , (String value) => Future <String >.error ('what do they say?' ));
@@ -145,7 +146,7 @@ void main() {
145146 }
146147 });
147148
148- testWidgets ('loadStructuredBinaryData handles exceptions correctly' , (WidgetTester tester) async {
149+ testWidgetsWithLeakTracking ('loadStructuredBinaryData handles exceptions correctly' , (WidgetTester tester) async {
149150 final TestAssetBundle bundle = TestAssetBundle ();
150151 try {
151152 await bundle.loadStructuredBinaryData ('AssetManifest.bin' , (ByteData value) => Future <String >.error ('buy more crystals' ));
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ import 'dart:ui';
66
77import 'package:flutter/services.dart' ;
88import 'package:flutter_test/flutter_test.dart' ;
9+ import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart' ;
910
1011void main () {
11- testWidgets ('initialLifecycleState is used to init state paused' , (WidgetTester tester) async {
12+ testWidgetsWithLeakTracking ('initialLifecycleState is used to init state paused' , (WidgetTester tester) async {
1213 expect (ServicesBinding .instance.lifecycleState, isNull);
1314 final TestWidgetsFlutterBinding binding = tester.binding;
1415 binding.resetLifecycleState ();
@@ -20,7 +21,7 @@ void main() {
2021 // even though no lifecycle event was fired from the platform.
2122 expect (binding.lifecycleState.toString (), equals ('AppLifecycleState.paused' ));
2223 });
23- testWidgets ('Handles all of the allowed states of AppLifecycleState' , (WidgetTester tester) async {
24+ testWidgetsWithLeakTracking ('Handles all of the allowed states of AppLifecycleState' , (WidgetTester tester) async {
2425 final TestWidgetsFlutterBinding binding = tester.binding;
2526 for (final AppLifecycleState state in AppLifecycleState .values) {
2627 binding.resetLifecycleState ();
You can’t perform that action at this time.
0 commit comments