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

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

Issue 2434123003: Merge more Kernel infrastructure from kernel_sdk SDK fork. (Closed)
Patch Set: 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/nullable_operator_test.dart
diff --git a/tests/kernel/unsorted/nullable_operator_test.dart b/tests/kernel/unsorted/nullable_operator_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..5730bbcf5c07e97739b9e9e9742a38c3a54137ab
--- /dev/null
+++ b/tests/kernel/unsorted/nullable_operator_test.dart
@@ -0,0 +1,9 @@
+import 'expect.dart';
Kevin Millikin (Google) 2016/10/21 09:10:58 Copyright header.
Vyacheslav Egorov (Google) 2016/10/21 13:39:43 Done.
+
+mkOne() => 1;
+mkNull() => null;
+
+main() {
+ Expect.isTrue((mkOne() ?? 2) == 1);
+ Expect.isTrue((mkNull() ?? 2) == 2);
+}

Powered by Google App Engine
This is Rietveld 408576698