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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user