@@ -18,6 +18,7 @@ void main() {
1818 testWidgets ('list lookup' , (WidgetTester tester) async {
1919 final Runtime runtime = Runtime ()
2020 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
21+ addTearDown (runtime.dispose);
2122 final DynamicContent data = DynamicContent (< String , Object ? > {
2223 'list' : < Object ? > [ 0 , 1 , 2 , 3 , 4 ],
2324 });
@@ -55,6 +56,7 @@ void main() {
5556 return const SizedBox .shrink ();
5657 },
5758 }));
59+ addTearDown (runtime.dispose);
5860 final DynamicContent data = DynamicContent (< String , Object ? > {
5961 'list' : < Object ? > [
6062 < String , Object ? > { 'a' : 0 },
@@ -131,6 +133,7 @@ void main() {
131133 testWidgets ('updateText, updateBinary, clearLibraries' , (WidgetTester tester) async {
132134 final Runtime runtime = Runtime ()
133135 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
136+ addTearDown (runtime.dispose);
134137 final DynamicContent data = DynamicContent ();
135138 await tester.pumpWidget (
136139 RemoteWidget (
@@ -167,6 +170,7 @@ void main() {
167170 testWidgets ('Runtime cached build' , (WidgetTester tester) async {
168171 final Runtime runtime = Runtime ()
169172 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
173+ addTearDown (runtime.dispose);
170174 final DynamicContent data = DynamicContent ();
171175 await tester.pumpWidget (
172176 RemoteWidget (
@@ -203,6 +207,7 @@ void main() {
203207 ..update (const LibraryName (< String > ['b' ]), parseLibraryFile ('''
204208 import a;
205209 ''' ));
210+ addTearDown (runtime.dispose);
206211 final DynamicContent data = DynamicContent ();
207212 await tester.pumpWidget (
208213 RemoteWidget (
@@ -219,6 +224,7 @@ void main() {
219224 ..update (const LibraryName (< String > ['a' ]), parseLibraryFile ('''
220225 import a;
221226 ''' ));
227+ addTearDown (runtime.dispose);
222228 final DynamicContent data = DynamicContent ();
223229 await tester.pumpWidget (
224230 RemoteWidget (
@@ -235,6 +241,7 @@ void main() {
235241 ..update (const LibraryName (< String > ['a' ]), parseLibraryFile ('''
236242 import b;
237243 ''' ));
244+ addTearDown (runtime.dispose);
238245 final DynamicContent data = DynamicContent ();
239246 await tester.pumpWidget (
240247 RemoteWidget (
@@ -249,6 +256,7 @@ void main() {
249256
250257 testWidgets ('Missing libraries in specified widget' , (WidgetTester tester) async {
251258 final Runtime runtime = Runtime ();
259+ addTearDown (runtime.dispose);
252260 final DynamicContent data = DynamicContent ();
253261 await tester.pumpWidget (
254262 RemoteWidget (
@@ -267,6 +275,7 @@ void main() {
267275 import b;
268276 widget widget = test();
269277 ''' ));
278+ addTearDown (runtime.dispose);
270279 final DynamicContent data = DynamicContent ();
271280 await tester.pumpWidget (
272281 RemoteWidget (
@@ -282,6 +291,7 @@ void main() {
282291 testWidgets ('Missing widget' , (WidgetTester tester) async {
283292 final Runtime runtime = Runtime ()
284293 ..update (const LibraryName (< String > ['a' ]), parseLibraryFile ('' ));
294+ addTearDown (runtime.dispose);
285295 final DynamicContent data = DynamicContent ();
286296 await tester.pumpWidget (
287297 RemoteWidget (
@@ -297,6 +307,7 @@ void main() {
297307 testWidgets ('Runtime' , (WidgetTester tester) async {
298308 final Runtime runtime = Runtime ()
299309 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
310+ addTearDown (runtime.dispose);
300311 final DynamicContent data = DynamicContent ();
301312 await tester.pumpWidget (
302313 RemoteWidget (
@@ -327,6 +338,7 @@ void main() {
327338 testWidgets ('Runtime' , (WidgetTester tester) async {
328339 final Runtime runtime = Runtime ()
329340 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
341+ addTearDown (runtime.dispose);
330342 final DynamicContent data = DynamicContent ();
331343 await tester.pumpWidget (
332344 RemoteWidget (
@@ -350,6 +362,7 @@ void main() {
350362 testWidgets ('Runtime' , (WidgetTester tester) async {
351363 final Runtime runtime = Runtime ()
352364 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
365+ addTearDown (runtime.dispose);
353366 expect (runtime.libraries.length, 1 );
354367 final LibraryName libraryName = runtime.libraries.entries.first.key;
355368 expect ('$libraryName ' , 'core' );
@@ -362,6 +375,7 @@ void main() {
362375 testWidgets ('Runtime' , (WidgetTester tester) async {
363376 final Runtime runtime = Runtime ()
364377 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
378+ addTearDown (runtime.dispose);
365379 final DynamicContent data = DynamicContent ();
366380 await tester.pumpWidget (
367381 RemoteWidget (
@@ -389,6 +403,7 @@ void main() {
389403 testWidgets ('DynamicContent' , (WidgetTester tester) async {
390404 final Runtime runtime = Runtime ()
391405 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
406+ addTearDown (runtime.dispose);
392407 final DynamicContent data = DynamicContent ();
393408 await tester.pumpWidget (
394409 RemoteWidget (
@@ -435,6 +450,7 @@ void main() {
435450 testWidgets ('binding loop variables' , (WidgetTester tester) async {
436451 final Runtime runtime = Runtime ()
437452 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
453+ addTearDown (runtime.dispose);
438454 final DynamicContent data = DynamicContent (< String , Object ? > {
439455 'list' : < Object ? > [
440456 < String , Object ? > {
@@ -600,6 +616,7 @@ void main() {
600616 testWidgets ('list lookup of esoteric values' , (WidgetTester tester) async {
601617 final Runtime runtime = Runtime ()
602618 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
619+ addTearDown (runtime.dispose);
603620 final DynamicContent data = DynamicContent ();
604621 await tester.pumpWidget (
605622 RemoteWidget (
@@ -720,6 +737,7 @@ void main() {
720737 testWidgets ('data lookup' , (WidgetTester tester) async {
721738 final Runtime runtime = Runtime ()
722739 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
740+ addTearDown (runtime.dispose);
723741 final DynamicContent data = DynamicContent (< String , Object ? > {
724742 'map' : < String , Object ? > { 'list' : < Object ? > [ 0xAB ] },
725743 });
@@ -744,6 +762,7 @@ void main() {
744762 testWidgets ('args lookup' , (WidgetTester tester) async {
745763 final Runtime runtime = Runtime ()
746764 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
765+ addTearDown (runtime.dispose);
747766 final DynamicContent data = DynamicContent ();
748767 await tester.pumpWidget (
749768 RemoteWidget (
@@ -767,6 +786,7 @@ void main() {
767786 testWidgets ('state lookup' , (WidgetTester tester) async {
768787 final Runtime runtime = Runtime ()
769788 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
789+ addTearDown (runtime.dispose);
770790 final DynamicContent data = DynamicContent ();
771791 await tester.pumpWidget (
772792 RemoteWidget (
@@ -789,6 +809,7 @@ void main() {
789809 testWidgets ('switch' , (WidgetTester tester) async {
790810 final Runtime runtime = Runtime ()
791811 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
812+ addTearDown (runtime.dispose);
792813 final DynamicContent data = DynamicContent ();
793814 await tester.pumpWidget (
794815 RemoteWidget (
@@ -824,6 +845,7 @@ void main() {
824845 testWidgets ('events with arguments' , (WidgetTester tester) async {
825846 final Runtime runtime = Runtime ()
826847 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
848+ addTearDown (runtime.dispose);
827849 final DynamicContent data = DynamicContent ();
828850 final List <String > eventLog = < String > [];
829851 await tester.pumpWidget (
@@ -872,6 +894,7 @@ void main() {
872894 testWidgets ('_CurriedWidget toStrings' , (WidgetTester tester) async {
873895 final Runtime runtime = Runtime ()
874896 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
897+ addTearDown (runtime.dispose);
875898 final DynamicContent data = DynamicContent ();
876899 runtime.update (const LibraryName (< String > ['test' ]), parseLibraryFile ('''
877900 import core;
@@ -911,6 +934,7 @@ void main() {
911934 testWidgets ('state setting' , (WidgetTester tester) async {
912935 final Runtime runtime = Runtime ()
913936 ..update (const LibraryName (< String > ['core' ]), createCoreWidgets ());
937+ addTearDown (runtime.dispose);
914938 final DynamicContent data = DynamicContent ();
915939 await tester.pumpWidget (
916940 RemoteWidget (
@@ -1029,6 +1053,7 @@ void main() {
10291053
10301054 testWidgets ('DataSource' , (WidgetTester tester) async {
10311055 final Runtime runtime = Runtime ();
1056+ addTearDown (runtime.dispose);
10321057 final DynamicContent data = DynamicContent ();
10331058 final List <String > eventLog = < String > [];
10341059 await tester.pumpWidget (
@@ -1094,6 +1119,7 @@ void main() {
10941119 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
10951120 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
10961121 final Runtime runtime = Runtime ();
1122+ addTearDown (runtime.dispose);
10971123 final DynamicContent data = DynamicContent ();
10981124 runtime.update (coreLibraryName, createCoreWidgets ());
10991125 runtime.update (localLibraryName, LocalWidgetLibrary (< String , LocalWidgetBuilder > {
@@ -1127,6 +1153,7 @@ void main() {
11271153 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
11281154 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
11291155 final Runtime runtime = Runtime ();
1156+ addTearDown (runtime.dispose);
11301157 final DynamicContent data = DynamicContent ();
11311158 const String expectedErrorMessage = 'Not a builder at [builder] (got core:Text {} {text: Not a builder :/}) for local:Builder.' ;
11321159
@@ -1163,6 +1190,7 @@ void main() {
11631190 };
11641191 final Runtime runtime = Runtime ()
11651192 ..update (const LibraryName (< String > ['a' ]), parseLibraryFile ('' ));
1193+ addTearDown (runtime.dispose);
11661194 final DynamicContent data = DynamicContent ();
11671195 await tester.pumpWidget (
11681196 RemoteWidget (
@@ -1182,6 +1210,7 @@ void main() {
11821210 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
11831211 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
11841212 final Runtime runtime = Runtime ();
1213+ addTearDown (runtime.dispose);
11851214 final DynamicContent data = DynamicContent ();
11861215 final Finder textFinder = find.byType (Text );
11871216
@@ -1214,6 +1243,7 @@ void main() {
12141243 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
12151244 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
12161245 final Runtime runtime = Runtime ();
1246+ addTearDown (runtime.dispose);
12171247 final DynamicContent data = DynamicContent ();
12181248 final Finder textFinder = find.byType (Text );
12191249
@@ -1247,6 +1277,7 @@ void main() {
12471277 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
12481278 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
12491279 final Runtime runtime = Runtime ();
1280+ addTearDown (runtime.dispose);
12501281 final DynamicContent data = DynamicContent ();
12511282 final Finder textFinder = find.byType (Text );
12521283
@@ -1283,6 +1314,7 @@ void main() {
12831314 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
12841315 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
12851316 final Runtime runtime = Runtime ();
1317+ addTearDown (runtime.dispose);
12861318 final DynamicContent data = DynamicContent (< String , Object > {'value' : 0 });
12871319 final Finder textFinder = find.byType (Text );
12881320
@@ -1322,6 +1354,7 @@ void main() {
13221354 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
13231355 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
13241356 final Runtime runtime = Runtime ();
1357+ addTearDown (runtime.dispose);
13251358 final DynamicContent data = DynamicContent ();
13261359 final List <RfwEvent > dispatchedEvents = < RfwEvent > [];
13271360 final Finder textFinder = find.byType (Text );
@@ -1363,6 +1396,7 @@ void main() {
13631396 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
13641397 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
13651398 final Runtime runtime = Runtime ();
1399+ addTearDown (runtime.dispose);
13661400 final DynamicContent data = DynamicContent ();
13671401 final Finder textFinder = find.byType (Text );
13681402 runtime.update (coreLibraryName, createCoreWidgets ());
@@ -1408,6 +1442,7 @@ void main() {
14081442 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
14091443 final Map <String , VoidCallback > handlers = < String , VoidCallback > {};
14101444 final Runtime runtime = Runtime ();
1445+ addTearDown (runtime.dispose);
14111446 final DynamicContent data = DynamicContent (< String , Object ? > {
14121447 'a1' : 'apricot' ,
14131448 'b1' : 'blueberry' ,
@@ -1474,6 +1509,7 @@ void main() {
14741509 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
14751510 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
14761511 final Runtime runtime = Runtime ();
1512+ addTearDown (runtime.dispose);
14771513 final DynamicContent data = DynamicContent ();
14781514 final Finder textFinder = find.byType (Text );
14791515
@@ -1522,6 +1558,7 @@ void main() {
15221558 const LibraryName localLibraryName = LibraryName (< String > ['local' ]);
15231559 const LibraryName remoteLibraryName = LibraryName (< String > ['remote' ]);
15241560 final Runtime runtime = Runtime ();
1561+ addTearDown (runtime.dispose);
15251562 final DynamicContent data = DynamicContent ();
15261563 final Finder textFinder = find.byType (Text );
15271564 runtime.update (coreLibraryName, createCoreWidgets ());
0 commit comments