Chromium Code Reviews| Index: pkg/unittest/test/exception_test.dart |
| diff --git a/pkg/unittest/test/exception_test.dart b/pkg/unittest/test/exception_test.dart |
| index f84ac18f8ef81440cb9d8e479f51e77895ae0fd9..023ab287d16c5cbb0c70f5c8b66627a56a88d076 100644 |
| --- a/pkg/unittest/test/exception_test.dart |
| +++ b/pkg/unittest/test/exception_test.dart |
| @@ -2,20 +2,23 @@ |
| // 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.exception_test; |
| import 'package:unittest/unittest.dart'; |
| -part 'utils.dart'; |
| +import 'package:metatest/metatest.dart'; |
| -var testName = 'exception test'; |
| +void main() => initTests(_test); |
| -var testFunction = (_) { |
| - test(testName, () { throw new Exception('Fail.'); }); |
| -}; |
| +void _test(message) { |
| + initMetatest(message); |
| -var expected = buildStatusString(0, 0, 1, testName, |
| - message: 'Test failed: Caught Exception: Fail.'); |
| + expectTestResults('good setup/good teardown', () { |
| + test('test', () { |
| + throw new Exception('Fail.'); |
| + }); |
| + }, [{ |
| + 'result': 'error', |
| + 'message': 'Test failed: Caught Exception: Fail.' |
| + }]); |
|
nweiz
2014/09/17 22:39:16
Similarly, this should use [expectTestsFail].
kevmoo
2014/09/18 22:11:33
Nope. This is an error, not a fail.
|
| +} |