@@ -31,8 +31,7 @@ class LocalTest extends Test {
3131 /// The test body.
3232 final AsyncFunction _body;
3333
34- LocalTest (this .name, this .metadata, body (), {this .trace})
35- : _body = body;
34+ LocalTest (this .name, this .metadata, body (), {this .trace}) : _body = body;
3635
3736 /// Loads a single runnable instance of this test.
3837 LiveTest load (Suite suite, {Iterable <Group > groups}) {
@@ -135,7 +134,8 @@ class Invoker {
135134
136135 Invoker ._(Suite suite, LocalTest test, {Iterable <Group > groups}) {
137136 _controller = new LiveTestController (
138- suite, test, _onRun, _onCloseCompleter.complete, groups: groups);
137+ suite, test, _onRun, _onCloseCompleter.complete,
138+ groups: groups);
139139 }
140140
141141 /// Runs [callback] after this test completes.
@@ -204,9 +204,7 @@ class Invoker {
204204 await fn ();
205205 counter.removeOutstandingCallback ();
206206 }, onError: _handleError);
207- }, zoneValues: {
208- _counterKey: counter
209- });
207+ }, zoneValues: {_counterKey: counter});
210208
211209 return counter.noOutstandingCallbacks.whenComplete (() {
212210 _outstandingCallbackZones.remove (zone);
@@ -221,9 +219,7 @@ class Invoker {
221219 unclosable (fn ()) {
222220 heartbeat ();
223221
224- return runZoned (fn, zoneValues: {
225- _closableKey: false
226- });
222+ return runZoned (fn, zoneValues: {_closableKey: false });
227223 }
228224
229225 /// Notifies the invoker that progress is being made.
@@ -234,15 +230,14 @@ class Invoker {
234230 if (liveTest.isComplete) return ;
235231 if (_timeoutTimer != null ) _timeoutTimer.cancel ();
236232
237- var timeout = liveTest.test.metadata.timeout
238- .apply (new Duration (seconds: 30 ));
233+ var timeout =
234+ liveTest.test.metadata.timeout .apply (new Duration (seconds: 30 ));
239235 if (timeout == null ) return ;
240236 _timeoutTimer = _invokerZone.createTimer (timeout, () {
241237 _outstandingCallbackZones.last.run (() {
242238 if (liveTest.isComplete) return ;
243- _handleError (
244- new TimeoutException (
245- "Test timed out after ${niceDuration (timeout )}." , timeout));
239+ _handleError (new TimeoutException (
240+ "Test timed out after ${niceDuration (timeout )}." , timeout));
246241 });
247242 });
248243 }
@@ -259,8 +254,8 @@ class Invoker {
259254 // failing after being complete.
260255 _controller.setState (const State (Status .complete, Result .error));
261256 throw "This test was marked as skipped after it had already completed. "
262- "Make sure to use\n "
263- "[expectAsync] or the [completes] matcher when testing async code." ;
257+ "Make sure to use\n "
258+ "[expectAsync] or the [completes] matcher when testing async code." ;
264259 }
265260
266261 if (message != null ) _controller.message (new Message .skip (message));
@@ -312,7 +307,7 @@ class Invoker {
312307
313308 _handleError (
314309 "This test failed after it had already completed. Make sure to use "
315- "[expectAsync]\n "
310+ "[expectAsync]\n "
316311 "or the [completes] matcher when testing async code." ,
317312 stackTrace);
318313 }
@@ -339,25 +334,25 @@ class Invoker {
339334 // microtask-level events.
340335 new Future (() async {
341336 await _test._body ();
342- await unclosable (() =>
343- Future .forEach (_tearDowns.reversed, errorsDontStopTest));
337+ await unclosable (
338+ () => Future .forEach (_tearDowns.reversed, errorsDontStopTest));
344339 removeOutstandingCallback ();
345340 });
346341
347342 await _outstandingCallbacks.noOutstandingCallbacks;
348343 if (_timeoutTimer != null ) _timeoutTimer.cancel ();
349344
350- _controller.setState (
351- new State (Status .complete, liveTest.state.result));
345+ _controller.setState (new State (Status .complete, liveTest.state.result));
352346
353347 _controller.completer.complete ();
354- }, zoneValues: {
355- #test.invoker: this ,
356- // Use the invoker as a key so that multiple invokers can have different
357- // outstanding callback counters at once.
358- _counterKey: outstandingCallbacksForBody,
359- _closableKey: true
360348 },
349+ zoneValues: {
350+ #test.invoker: this ,
351+ // Use the invoker as a key so that multiple invokers can have different
352+ // outstanding callback counters at once.
353+ _counterKey: outstandingCallbacksForBody,
354+ _closableKey: true
355+ },
361356 zoneSpecification: new ZoneSpecification (
362357 print: (self, parent, zone, line) =>
363358 _controller.message (new Message .print (line))),
0 commit comments