Index: tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart |
diff --git a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart |
index eab5618d5a4c0da981234b3bda32eaf5dbd590f9..6ee336dc57b8fbe668c07a533ce374d1f88157ad 100644 |
--- a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart |
+++ b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart |
@@ -175,6 +175,18 @@ class W<Z> {} |
main() { |
print(new C<String>().a); |
} |
+''' |
+ }, expectIdenticalOutput: true), |
+ const Test(const { |
+ 'main.dart': ''' |
+class _Marker { const _Marker(); } |
+const _MARKER = const _Marker(); |
+class Thing<X> { |
+ Thing([length = _MARKER]); |
+} |
+main() { |
+ print(new Thing<String>(100)); |
+} |
''' |
}, expectIdenticalOutput: true), |
]; |
@@ -192,11 +204,15 @@ Future runTests(List<String> args, |
bool skipErrors: false, |
List<String> options: const <String>[]}) async { |
Arguments arguments = new Arguments.from(args); |
- List<Test> tests; |
- if (arguments.uri != null) { |
+ List<Test> tests = TESTS; |
+ if (arguments.start != null) { |
+ int start = arguments.start; |
+ int end = arguments.end ?? 0; // Default 'end' to single test. |
+ if (end > tests.length) end = tests.length; // Large 'end' means all. |
+ if (end <= start) end = start + 1; // Always at least one test (else Error). |
+ tests = tests.sublist(start, end); |
+ } else if (arguments.uri != null) { |
tests = <Test>[new Test.fromUri(arguments.uri)]; |
- } else { |
- tests = TESTS; |
} |
for (Test test in tests) { |
if (test.uri != null) { |