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

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

Issue 2451623006: Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork." (Closed)
Patch Set: Fix 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
« no previous file with comments | « tests/kernel/unsorted/return_test.dart ('k') | tests/kernel/unsorted/string_buffer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/kernel/unsorted/simple_literal_test.dart
diff --git a/tests/kernel/unsorted/simple_literal_test.dart b/tests/kernel/unsorted/simple_literal_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..c8b8c2d7f89b551c2cf204313713c2ab09cc2c4a
--- /dev/null
+++ b/tests/kernel/unsorted/simple_literal_test.dart
@@ -0,0 +1,45 @@
+// 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 literals (and imports, return, ==, and static methods).
+import 'expect.dart';
+
+test0() {
+ return 'Hello, world!';
+}
+
+test1() {
+ return 42;
+}
+
+test2() {
+ return 2.71828;
+}
+
+test3() {
+ return 6.022e23;
+}
+
+test4() {
+ return true;
+}
+
+test5() {
+ return false;
+}
+
+test6() {
+ return 1405006117752879898543142606244511569936384000000000;
+}
+
+main() {
+ Expect.isTrue(test0() == 'Hello, world!');
+ Expect.isTrue(test1() == 42);
+ Expect.isTrue(test2() == 2.71828);
+ Expect.isTrue(test3() == 6.022e23);
+ Expect.isTrue(test4());
+ Expect.isTrue(test5() == false);
+ Expect.isTrue(
+ test6() == 1405006117752879898543142606244511569936384000000000);
+}
« no previous file with comments | « tests/kernel/unsorted/return_test.dart ('k') | tests/kernel/unsorted/string_buffer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698