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

Unified Diff: tests/kernel/unsorted/return_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/return_test.dart
diff --git a/tests/kernel/unsorted/return_test.dart b/tests/kernel/unsorted/return_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..61920b38b72450378fa022726f9e6097f9b69662
--- /dev/null
+++ b/tests/kernel/unsorted/return_test.dart
@@ -0,0 +1,28 @@
+// 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 return (and imports, literals, ==, and static methods).
+
+import 'expect.dart';
+
+test0() {}
+
+test1() { return; }
+
+test3() { return 3; }
+
+test4() => 4;
+
+test5() {
+ return 5;
+ Expect.isTrue(false);
+}
+
+main() {
+ Expect.isTrue(test0() == null);
+ Expect.isTrue(test1() == null);
+ Expect.isTrue(test3() == 3);
+ Expect.isTrue(test4() == 4);
+ Expect.isTrue(test5() == 5);
+}

Powered by Google App Engine
This is Rietveld 408576698