| Index: pkg/unittest/test/teardown_test.dart
|
| diff --git a/pkg/unittest/test/teardown_test.dart b/pkg/unittest/test/teardown_test.dart
|
| index 8d233982781b40cbf7a2ddb4eb7815273f48035c..c2af6081840bb941ec07ee68d260660de08293c6 100644
|
| --- a/pkg/unittest/test/teardown_test.dart
|
| +++ b/pkg/unittest/test/teardown_test.dart
|
| @@ -2,23 +2,35 @@
|
| // 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.teardown_test;
|
|
|
| import 'package:unittest/unittest.dart';
|
|
|
| -part 'utils.dart';
|
| +import 'package:metatest/metatest.dart';
|
| +
|
| +void main() => initTests(_test);
|
| +
|
| +void _test(message) {
|
| + initMetatest(message);
|
|
|
| -var testName = 'teardown test';
|
| + expectTestResults('teardown test', () {
|
| + var tornDown = false;
|
|
|
| -var testFunction = (TestConfiguration testConfig) {
|
| - group('a', () {
|
| - tearDown(() { testConfig.teardown = 'teardown'; });
|
| - test(testName, () {});
|
| - });
|
| -};
|
| + group('a', () {
|
| + tearDown(() {
|
| + tornDown = true;
|
| + });
|
| + test('test', () {});
|
| + });
|
|
|
| -var expected = buildStatusString(1, 0, 0, 'a $testName',
|
| - count: 0, setup: '', teardown: 'teardown');
|
| + test('expect teardown', () {
|
| + expect(tornDown, isTrue);
|
| + });
|
| + }, [{
|
| + 'description': 'a test',
|
| + 'result': 'pass',
|
| + }, {
|
| + 'description': 'expect teardown',
|
| + 'result': 'pass',
|
| + }]);
|
| +}
|
|
|