Index: pkg/unittest/test/late_exception_test.dart |
diff --git a/pkg/unittest/test/late_exception_test.dart b/pkg/unittest/test/late_exception_test.dart |
index 4fec9770e96884fa5d293c7113b5de0046919014..89a4c1c21254d91cce923c68e5ed986f2df7d703 100644 |
--- a/pkg/unittest/test/late_exception_test.dart |
+++ b/pkg/unittest/test/late_exception_test.dart |
@@ -2,28 +2,36 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-library unittestTest; |
- |
-import 'dart:async'; |
-import 'dart:isolate'; |
+library unittest.late_exception_test; |
+import 'package:metatest/metatest.dart'; |
import 'package:unittest/unittest.dart'; |
-part 'utils.dart'; |
+import 'utils.dart'; |
-var testName = 'late exception test'; |
+void main() => initTests(_test); |
-var testFunction = (_) { |
- var f; |
- test('testOne', () { |
- f = expectAsync(() {}); |
- _defer(f); |
- }); |
- test('testTwo', () { |
- _defer(expectAsync(() { f(); })); |
- }); |
-}; |
+void _test(message) { |
+ initMetatest(message); |
-var expected = buildStatusString(1, 0, 1, 'testOne', |
- message: 'Callback called (2) after test case testOne has already ' |
- 'been marked as pass.:testTwo:'); |
+ expectTestResults('late exception test', () { |
+ var f; |
+ test('testOne', () { |
+ f = expectAsync(() {}); |
+ defer(f); |
+ }); |
+ test('testTwo', () { |
+ defer(expectAsync(() { |
+ f(); |
+ })); |
+ }); |
+ }, [{ |
+ 'description': 'testOne', |
+ 'message': 'Callback called (2) after test case testOne has already been ' |
+ 'marked as pass.', |
+ 'result': 'error', |
+ }, { |
+ 'description': 'testTwo', |
+ 'result': 'pass', |
+ }]); |
+} |