Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(677)

Unified Diff: tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart

Issue 2980973003: Default value constants are created only call uses them (Closed)
Patch Set: register default values Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/equivalence/check_functions.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « tests/compiler/dart2js/equivalence/check_functions.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698