Unverified Commit 514701fe authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

Remove test group in favour of addTearDown (#17962)

parent 7c60b740
...@@ -18,7 +18,7 @@ When the exception was thrown, this was the stack: ...@@ -18,7 +18,7 @@ When the exception was thrown, this was the stack:
The test description was: The test description was:
TestAsyncUtils - handling unguarded async helper functions TestAsyncUtils - handling unguarded async helper functions
════════════════════════════════════════════════════════════════════════════════════════════════════ ════════════════════════════════════════════════════════════════════════════════════════════════════
.*..:.. \+0 -1: - TestAsyncUtils - handling unguarded async helper functions * .*..:.. \+0 -1: TestAsyncUtils - handling unguarded async helper functions *
Test failed\. See exception logs above\. Test failed\. See exception logs above\.
The test description was: TestAsyncUtils - handling unguarded async helper functions The test description was: TestAsyncUtils - handling unguarded async helper functions
* *
......
...@@ -9,7 +9,7 @@ There was one transient callback left. The stack trace for when it was registere ...@@ -9,7 +9,7 @@ There was one transient callback left. The stack trace for when it was registere
#[0-9]+ main.+ \(.+/dev/automated_tests/flutter_test/ticker_test\.dart:[0-9]+:[0-9]+\) #[0-9]+ main.+ \(.+/dev/automated_tests/flutter_test/ticker_test\.dart:[0-9]+:[0-9]+\)
<<skip until matching line>> <<skip until matching line>>
════════════════════════════════════════════════════════════════════════════════════════════════════ ════════════════════════════════════════════════════════════════════════════════════════════════════
.*..:.. \+0 -1: - Does flutter_test catch leaking tickers\? \[E\] .*..:.. \+0 -1: Does flutter_test catch leaking tickers\? \[E\]
Test failed\. See exception logs above\. Test failed\. See exception logs above\.
The test description was: Does flutter_test catch leaking tickers\? The test description was: Does flutter_test catch leaking tickers\?
* *
......
[0-9]+:[0-9]+ [+]0: - A trivial widget test [0-9]+:[0-9]+ [+]0: A trivial widget test
[0-9]+:[0-9]+ [+]1: All tests passed! [0-9]+:[0-9]+ [+]1: All tests passed!
...@@ -57,20 +57,19 @@ void testWidgets(String description, WidgetTesterCallback callback, { ...@@ -57,20 +57,19 @@ void testWidgets(String description, WidgetTesterCallback callback, {
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized(); final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
final WidgetTester tester = new WidgetTester._(binding); final WidgetTester tester = new WidgetTester._(binding);
timeout ??= binding.defaultTestTimeout; timeout ??= binding.defaultTestTimeout;
test_package.group('-', () {
test_package.test( test_package.test(
description, description,
() { () {
return binding.runTest( test_package.addTearDown(binding.postTest);
() => callback(tester), return binding.runTest(
tester._endOfTestVerifications, () => callback(tester),
description: description ?? '', tester._endOfTestVerifications,
); description: description ?? '',
}, );
skip: skip, },
); skip: skip,
test_package.tearDown(binding.postTest); timeout: timeout
}, timeout: timeout); );
} }
/// Runs the [callback] inside the Flutter benchmark environment. /// Runs the [callback] inside the Flutter benchmark environment.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment