mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
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:
parent
a7d2f8359f
commit
8d5fe6d430
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue