@@ -15,7 +15,6 @@ import 'package:test_api/src/backend/suite_platform.dart'; // ignore: implementa
1515import 'package:test_api/src/backend/test.dart' ; // ignore: implementation_imports
1616
1717import '../util/io_stub.dart' if (dart.library.io) '../util/io.dart' ;
18- import '../util/pair.dart' ;
1918import 'load_exception.dart' ;
2019import 'plugin/environment.dart' ;
2120import 'runner_suite.dart' ;
@@ -61,13 +60,13 @@ class LoadSuite extends Suite implements RunnerSuite {
6160 ///
6261 /// This will return `null` if the suite is unavailable for some reason (for
6362 /// example if an error occurred while loading it).
64- Future <RunnerSuite ?> get suite async => (await _suiteAndZone)? .first ;
63+ Future <RunnerSuite ?> get suite async => (await _suiteAndZone)? .suite ;
6564
6665 /// A future that completes to a pair of [suite] and the load test's [Zone] .
6766 ///
6867 /// This will return `null` if the suite is unavailable for some reason (for
6968 /// example if an error occurred while loading it).
70- final Future <Pair < RunnerSuite , Zone > ?> _suiteAndZone;
69+ final Future <({ RunnerSuite suite , Zone zone}) ?> _suiteAndZone;
7170
7271 /// Returns the test that loads the suite.
7372 ///
@@ -86,7 +85,7 @@ class LoadSuite extends Suite implements RunnerSuite {
8685 factory LoadSuite (String name, SuiteConfiguration config,
8786 SuitePlatform platform, FutureOr <RunnerSuite ?> Function () body,
8887 {String ? path}) {
89- var completer = Completer <Pair < RunnerSuite , Zone > ?>.sync ();
88+ var completer = Completer <({ RunnerSuite suite , Zone zone}) ?>.sync ();
9089 return LoadSuite ._(name, config, platform, () {
9190 var invoker = Invoker .current;
9291 invoker! .addOutstandingCallback ();
@@ -106,7 +105,8 @@ class LoadSuite extends Suite implements RunnerSuite {
106105 return ;
107106 }
108107
109- completer.complete (suite == null ? null : Pair (suite, Zone .current));
108+ completer.complete (
109+ suite == null ? null : (suite: suite, zone: Zone .current));
110110 invoker.removeOutstandingCallback ();
111111 }());
112112
@@ -179,12 +179,12 @@ class LoadSuite extends Suite implements RunnerSuite {
179179 return LoadSuite ._changeSuite (this , _suiteAndZone.then ((pair) {
180180 if (pair == null ) return null ;
181181
182- var zone = pair.last ;
182+ var ( : suite, : zone) = pair;
183183 RunnerSuite ? newSuite;
184184 zone.runGuarded (() {
185- newSuite = change (pair.first );
185+ newSuite = change (suite );
186186 });
187- return newSuite == null ? null : Pair ( newSuite! , zone);
187+ return newSuite == null ? null : (suite : newSuite! , zone : zone);
188188 }));
189189 }
190190
0 commit comments