OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library testing.suite; | 5 library testing.suite; |
6 | 6 |
7 import 'chain.dart' show | 7 import 'chain.dart' show Chain; |
8 Chain; | |
9 | 8 |
10 import 'test_dart.dart' show | 9 import 'test_dart.dart' show TestDart; |
11 TestDart; | |
12 | 10 |
13 /// Records the properties of a test suite. | 11 /// Records the properties of a test suite. |
14 abstract class Suite { | 12 abstract class Suite { |
15 final String name; | 13 final String name; |
16 | 14 |
17 final String kind; | 15 final String kind; |
18 | 16 |
19 final Uri statusFile; | 17 final Uri statusFile; |
20 | 18 |
21 Suite(this.name, this.kind, this.statusFile); | 19 Suite(this.name, this.kind, this.statusFile); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 70 |
73 final List<RegExp> pattern; | 71 final List<RegExp> pattern; |
74 | 72 |
75 final List<RegExp> exclude; | 73 final List<RegExp> exclude; |
76 | 74 |
77 Dart(String name, this.uri, this.pattern, this.exclude) | 75 Dart(String name, this.uri, this.pattern, this.exclude) |
78 : super(name, "dart", null); | 76 : super(name, "dart", null); |
79 | 77 |
80 factory Dart.fromJsonMap(Uri base, Map json, String name) { | 78 factory Dart.fromJsonMap(Uri base, Map json, String name) { |
81 Uri uri = base.resolve(json["path"]); | 79 Uri uri = base.resolve(json["path"]); |
82 List<RegExp> pattern = new List<RegExp>.from( | 80 List<RegExp> pattern = |
83 json["pattern"].map((String p) => new RegExp(p))); | 81 new List<RegExp>.from(json["pattern"].map((String p) => new RegExp(p))); |
84 List<RegExp> exclude = new List<RegExp>.from( | 82 List<RegExp> exclude = |
85 json["exclude"].map((String p) => new RegExp(p))); | 83 new List<RegExp>.from(json["exclude"].map((String p) => new RegExp(p))); |
86 return new Dart(name, uri, pattern, exclude); | 84 return new Dart(name, uri, pattern, exclude); |
87 } | 85 } |
88 | 86 |
89 String toString() => "Dart($name, $uri, $pattern, $exclude)"; | 87 String toString() => "Dart($name, $uri, $pattern, $exclude)"; |
90 } | 88 } |
OLD | NEW |