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