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

Unified Diff: pkg/kernel/testcases/interpreter/static_invocation_test.dart

Issue 2841803002: Add initial tests for Kernel interpreter (Closed)
Patch Set: Remove some tests Created 3 years, 8 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
Index: pkg/kernel/testcases/interpreter/static_invocation_test.dart
diff --git a/pkg/kernel/testcases/interpreter/static_invocation_test.dart b/pkg/kernel/testcases/interpreter/static_invocation_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..3baa273975397f51188ea07b631c29547fc496a8
--- /dev/null
+++ b/pkg/kernel/testcases/interpreter/static_invocation_test.dart
@@ -0,0 +1,28 @@
+library static_invocation_test;
+
+void main() {
+ a();
+ b(1, 9);
+ print(b(1, 9));
+ var retD = d();
+ print(c(37));
+ print(retD);
+}
+
+void a() {}
+
+void b(int n, int m) {
+ print(n);
+ print(m);
+ print(n + m);
+}
+
+String c(int n) {
+ print('c:$n');
+ return "d:${d()}";
+}
+
+int d() {
+ a();
+ return 37;
+}

Powered by Google App Engine
This is Rietveld 408576698