Don't use runBinaryGuarded. (#11816)

Since the called function can't throw, there is no need for the "guarded".
Since the function returns something, running in guarded mode doesn't really work. The `uncaught` handler wouldn't know what to return (except for `null`).
This commit is contained in:
Florian Loitsch 2017-08-29 19:54:00 +02:00 committed by GitHub
parent a7d2f8359f
commit 8d5fe6d430

View file

@ -439,7 +439,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
);
_parentZone = Zone.current;
final Zone testZone = _parentZone.fork(specification: errorHandlingZoneSpecification);
testZone.runBinaryGuarded(_runTestBody, testBody, invariantTester)
testZone.runBinary(_runTestBody, testBody, invariantTester)
.whenComplete(_testCompletionHandler);
asyncBarrier(); // When using AutomatedTestWidgetsFlutterBinding, this flushes the microtasks.
return _currentTestCompleter.future;