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 import 'package:stack_trace/stack_trace.dart'; |
| 6 |
5 import 'metadata.dart'; | 7 import 'metadata.dart'; |
6 import 'operating_system.dart'; | 8 import 'operating_system.dart'; |
7 import 'test.dart'; | 9 import 'test.dart'; |
8 import 'test_platform.dart'; | 10 import 'test_platform.dart'; |
9 | 11 |
10 /// A [Test] or [Group]. | 12 /// A [Test] or [Group]. |
11 abstract class GroupEntry { | 13 abstract class GroupEntry { |
12 /// The name of the entry, including the prefixes from any containing | 14 /// The name of the entry, including the prefixes from any containing |
13 /// [Group]s. | 15 /// [Group]s. |
14 /// | 16 /// |
15 /// This will be `null` for the root group. | 17 /// This will be `null` for the root group. |
16 String get name; | 18 String get name; |
17 | 19 |
18 /// The metadata for the entry, including the metadata from any containing | 20 /// The metadata for the entry, including the metadata from any containing |
19 /// [Group]s. | 21 /// [Group]s. |
20 Metadata get metadata; | 22 Metadata get metadata; |
21 | 23 |
| 24 /// The stack trace for the call to `test()` or `group()` that defined this |
| 25 /// entry, or `null` if the entry was defined in a different way. |
| 26 Trace get trace; |
| 27 |
22 /// Returns a copy of [this] with all platform-specific metadata resolved. | 28 /// Returns a copy of [this] with all platform-specific metadata resolved. |
23 /// | 29 /// |
24 /// Removes any tests and groups with [Metadata.testOn] selectors that don't | 30 /// Removes any tests and groups with [Metadata.testOn] selectors that don't |
25 /// match [platform] and [selector]. Returns `null` if this entry's selector | 31 /// match [platform] and [selector]. Returns `null` if this entry's selector |
26 /// doesn't match. | 32 /// doesn't match. |
27 GroupEntry forPlatform(TestPlatform platform, {OperatingSystem os}); | 33 GroupEntry forPlatform(TestPlatform platform, {OperatingSystem os}); |
28 | 34 |
29 /// Returns a copy of [this] with all tests that don't match [callback] | 35 /// Returns a copy of [this] with all tests that don't match [callback] |
30 /// removed. | 36 /// removed. |
31 /// | 37 /// |
32 /// Returns `null` if this is a test that doesn't match [callback] or a group | 38 /// Returns `null` if this is a test that doesn't match [callback] or a group |
33 /// where no child tests match [callback]. | 39 /// where no child tests match [callback]. |
34 GroupEntry filter(bool callback(Test test)); | 40 GroupEntry filter(bool callback(Test test)); |
35 } | 41 } |
OLD | NEW |