From 8d5fe6d4300f736d1696629fb109d3a479e8e0ae Mon Sep 17 00:00:00 2001 From: Florian Loitsch Date: Tue, 29 Aug 2017 19:54:00 +0200 Subject: [PATCH] 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`). --- packages/flutter_test/lib/src/binding.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart index 094c7474d2..f544df7844 100644 --- a/packages/flutter_test/lib/src/binding.dart +++ b/packages/flutter_test/lib/src/binding.dart @@ -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;