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

Unified Diff: tests/kernel/unsorted/invocation_test.dart

Issue 2434123003: Merge more Kernel infrastructure from kernel_sdk SDK fork. (Closed)
Patch Set: address more comments Created 4 years, 2 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: tests/kernel/unsorted/invocation_test.dart
diff --git a/tests/kernel/unsorted/invocation_test.dart b/tests/kernel/unsorted/invocation_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..3e5ec1788543f06b8ea4c86baf6672b8d3639ec7
--- /dev/null
+++ b/tests/kernel/unsorted/invocation_test.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests of invocations.
+
+import 'expect.dart';
+
+test0(x) {
+ Expect.isTrue(x == 'argument0');
+ return 'return0';
+}
+
+class C0 {
+ static test1(x) {
+ Expect.isTrue(x == 'argument1');
+ return 'return1';
+ }
+}
+
+class C1 {
+ test2(x) {
+ Expect.isTrue(x == 'argument2');
+ return 'return2';
+ }
+}
+
+class C2 {
+ C2.test3(x) {
+ Expect.isTrue(x == 'argument3');
+ }
+}
+
+main() {
+ Expect.isTrue(test0('argument0') == 'return0');
+ Expect.isTrue(C0.test1('argument1') == 'return1');
+ Expect.isTrue(new C1().test2('argument2') == 'return2');
+ var c = new C2.test3('argument3');
+ Expect.isTrue(c is C2);
+}

Powered by Google App Engine
This is Rietveld 408576698