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.declarer; | 5 library unittest.backend.declarer; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'group.dart'; | 9 import 'group.dart'; |
10 import 'invoker.dart'; | 10 import 'invoker.dart'; |
11 import 'test.dart'; | 11 import 'test.dart'; |
12 | 12 |
13 /// A class that manages the state of tests as they're declared. | 13 /// A class that manages the state of tests as they're declared. |
14 /// | 14 /// |
15 /// This is in charge of tracking the current group, set-up, and tear-down | 15 /// This is in charge of tracking the current group, set-up, and tear-down |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 /// groups or at the top level. | 85 /// groups or at the top level. |
86 void tearDown(callback()) { | 86 void tearDown(callback()) { |
87 if (_group.tearDown != null) { | 87 if (_group.tearDown != null) { |
88 throw new StateError("tearDown() may not be called multiple times for " | 88 throw new StateError("tearDown() may not be called multiple times for " |
89 "the same group."); | 89 "the same group."); |
90 } | 90 } |
91 | 91 |
92 _group.tearDown = callback; | 92 _group.tearDown = callback; |
93 } | 93 } |
94 } | 94 } |
OLD | NEW |