mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08: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…
x
Reference in New Issue
Block a user