Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: pkg/unittest/test/async_setup_teardown_test.dart

Issue 319983005: pkg/unittest: test cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/unittest/test/async_exception_test.dart ('k') | pkg/unittest/test/breath_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library unittestTest; 5 library unittestTest;
6
7 import 'dart:async';
6 import 'dart:isolate'; 8 import 'dart:isolate';
7 import 'dart:async'; 9
8 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
9 11
10 part 'unittest_test_utils.dart'; 12 part 'utils.dart';
11 13
12 var testName = 'async setup teardown test'; 14 var testName = 'async setup teardown test';
13 15
14 var testFunction = (_) { 16 var testFunction = (_) {
15 group('good setup/good teardown', () { 17 group('good setup/good teardown', () {
16 setUp(() { 18 setUp(() {
17 return new Future.value(0); 19 return new Future.value(0);
18 }); 20 });
19 tearDown(() { 21 tearDown(() {
20 return new Future.value(0); 22 return new Future.value(0);
(...skipping 25 matching lines...) Expand all
46 tearDown(() { 48 tearDown(() {
47 return new Future.error("Failed to complete tearDown"); 49 return new Future.error("Failed to complete tearDown");
48 }); 50 });
49 test('foo4', () {}); 51 test('foo4', () {});
50 }); 52 });
51 // The next test is just to make sure we make steady progress 53 // The next test is just to make sure we make steady progress
52 // through the tests. 54 // through the tests.
53 test('post groups', () {}); 55 test('post groups', () {});
54 }; 56 };
55 57
56 var expected = buildStatusString(2, 0, 3, 58 final expected = buildStatusString(2, 0, 3,
57 'good setup/good teardown foo1::' 59 'good setup/good teardown foo1::'
58 'good setup/bad teardown foo2:' 60 'good setup/bad teardown foo2:'
59 'Teardown failed: Caught Failed to complete tearDown:' 61 'Teardown failed: Caught Failed to complete tearDown:'
60 'bad setup/good teardown foo3:' 62 'bad setup/good teardown foo3:'
61 'Setup failed: Caught Failed to complete setUp:' 63 'Setup failed: Caught Failed to complete setUp:'
62 'bad setup/bad teardown foo4:' 64 'bad setup/bad teardown foo4:'
63 'Setup failed: Caught Failed to complete setUp:' 65 'Setup failed: Caught Failed to complete setUp:'
64 'post groups'); 66 'post groups');
OLDNEW
« no previous file with comments | « pkg/unittest/test/async_exception_test.dart ('k') | pkg/unittest/test/breath_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698