OLD | NEW |
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 unittest.nested_groups_setup_teardown_test; | 5 library unittest.nested_groups_setup_teardown_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 }); | 36 }); |
37 }); | 37 }); |
38 }); | 38 }); |
39 }); | 39 }); |
40 test('after nest', () { | 40 test('after nest', () { |
41 expect(s.toString(), "l1 U l2 U l4 U l5 U l6 D l4 D l2 D "); | 41 expect(s.toString(), "l1 U l2 U l4 U l5 U l6 D l4 D l2 D "); |
42 }); | 42 }); |
43 }); | 43 }); |
44 } | 44 } |
45 | 45 |
46 | |
47 Function makeDelayedSetup(int index, StringBuffer s) => () { | 46 Function makeDelayedSetup(int index, StringBuffer s) => () { |
48 return new Future.delayed(new Duration(milliseconds: 1), () { | 47 return new Future.delayed(new Duration(milliseconds: 1), () { |
49 s.write('l$index U '); | 48 s.write('l$index U '); |
50 }); | 49 }); |
51 }; | 50 }; |
52 | 51 |
53 Function makeDelayedTeardown(int index, StringBuffer s) => () { | 52 Function makeDelayedTeardown(int index, StringBuffer s) => () { |
54 return new Future.delayed(new Duration(milliseconds: 1), () { | 53 return new Future.delayed(new Duration(milliseconds: 1), () { |
55 s.write('l$index D '); | 54 s.write('l$index D '); |
56 }); | 55 }); |
57 }; | 56 }; |
58 | 57 |
59 Function makeImmediateSetup(int index, StringBuffer s) => () { | 58 Function makeImmediateSetup(int index, StringBuffer s) => () { |
60 s.write('l$index U '); | 59 s.write('l$index U '); |
61 }; | 60 }; |
62 | 61 |
63 Function makeImmediateTeardown(int index, StringBuffer s) => () { | 62 Function makeImmediateTeardown(int index, StringBuffer s) => () { |
64 s.write('l$index D '); | 63 s.write('l$index D '); |
65 }; | 64 }; |
OLD | NEW |