OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.backend.group; | 5 library test.backend.group; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import '../utils.dart'; | 9 import '../utils.dart'; |
10 import 'metadata.dart'; | 10 import 'metadata.dart'; |
11 | 11 |
12 /// A group contains multiple tests and subgroups. | 12 /// A group contains multiple tests and subgroups. |
13 /// | 13 /// |
14 /// A group has a description that is prepended to that of all nested tests and | 14 /// A group has a description that is prepended to that of all nested tests and |
15 /// subgroups. It also has [setUp] and [tearDown] functions which are scoped to | 15 /// subgroups. It also has [setUp] and [tearDown] functions which are scoped to |
(...skipping 59 matching lines...) Loading... |
75 if (parent != null) { | 75 if (parent != null) { |
76 return new Future.sync(() { | 76 return new Future.sync(() { |
77 if (tearDown != null) return tearDown(); | 77 if (tearDown != null) return tearDown(); |
78 }).then((_) => parent.runTearDown()); | 78 }).then((_) => parent.runTearDown()); |
79 } | 79 } |
80 | 80 |
81 if (tearDown != null) return new Future.sync(tearDown); | 81 if (tearDown != null) return new Future.sync(tearDown); |
82 return new Future.value(); | 82 return new Future.value(); |
83 } | 83 } |
84 } | 84 } |
OLD | NEW |