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

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

Issue 2959773003: Share test-source between full emitter and fast startup emitter dill tests. (Closed)
Patch Set: Created 3 years, 6 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/kernel/compile_from_dill_test.dart ('k') | no next file » | 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 8f781d4784591942b8b8c9f8279f088a0b8cefc2..b934b660ac82c23954b78346549ffc3cc05e2286 100644
--- a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
+++ b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
@@ -29,6 +29,63 @@ import 'test_helpers.dart';
import 'compiler_helper.dart';
+const SOURCE = const {
+ 'main.dart': '''
+foo({named}) => 1;
+bar(a) => !a;
+class Class {
+ var field;
+ static var staticField;
+
+ Class();
+ Class.named(this.field);
+
+ method() {}
+}
+
+class SubClass extends Class {
+ method() {
+ super.method();
+ }
+}
+main() {
+ foo();
+ bar(true);
+ [];
+ {};
+ new Object();
+ new Class.named('');
+ new SubClass().method();
+ Class.staticField;
+ var x = null;
+ var y1 = x == null;
+ var y2 = null == x;
+ var z1 = x?.toString();
+ var z2 = x ?? y1;
+ var z3 = x ??= y2;
+ var w = x == null ? null : x.toString();
+ for (int i = 0; i < 10; i++) {
+ if (i == 5) continue;
+ x = i;
+ if (i == 5) break;
+ }
+ int i = 0;
+ while (i < 10) {
+ if (i == 5) continue;
+ x = i;
+ if (i == 5) break;
+ }
+ for (var v in [3, 5]) {
+ if (v == 5) continue;
+ x = v;
+ if (v == 5) break;
+ }
+ print(x);
+ return x;
+}
+'''
+};
+
enum ResultKind { crashes, errors, warnings, success, failure }
Future<ResultKind> runTest(
« no previous file with comments | « tests/compiler/dart2js/kernel/compile_from_dill_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698