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

Unified Diff: tests/language/src/CompileTimeConstant6Test.dart

Issue 9427012: Allow binary operators on compile-time-constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file.wq Created 8 years, 10 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/language/src/CompileTimeConstant5Test.dart ('k') | tests/language/src/CompileTimeConstantTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/CompileTimeConstant6Test.dart
diff --git a/tests/language/src/CompileTimeConstant6Test.dart b/tests/language/src/CompileTimeConstant6Test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..44aaff7765bb8f8eca0babd1098fa9e560ebfc9b
--- /dev/null
+++ b/tests/language/src/CompileTimeConstant6Test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2012, 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.
+
+final g1 = true;
+final g2 = 499;
+final g3 = "foo";
+final g4 = 3.3;
+final g5 = g1 == g2;
+final g6 = g1 == g3;
+final g7 = g1 == g4;
+final g8 = g2 == g3;
+final g9 = g2 == g4;
+final g10 = g3 == g4;
+final g11 = g1 == g1;
+final g12 = g2 == g2;
+final g13 = g3 == g3;
+final g14 = g4 == g4;
+
+main() {
+ Expect.isFalse(g5);
+ Expect.isFalse(g6);
+ Expect.isFalse(g7);
+ Expect.isFalse(g8);
+ Expect.isFalse(g9);
+ Expect.isFalse(g10);
+ Expect.isTrue(g11);
+ Expect.isTrue(g12);
+ Expect.isTrue(g13);
+ Expect.isTrue(g14);
+}
« no previous file with comments | « tests/language/src/CompileTimeConstant5Test.dart ('k') | tests/language/src/CompileTimeConstantTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698