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

Unified Diff: tests/language/compile_time_constant2_test.dart

Issue 10825386: Use JavaScript runtime semantics when constant folding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comment and test update. Created 8 years, 3 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/language/compile_time_constant2_test.dart
diff --git a/tests/language/compile_time_constant2_test.dart b/tests/language/compile_time_constant2_test.dart
index 5348e9d275c4de761d4a84b1fc6c74d1cfa1a496..1df0b92d083347bb688b6edbdfa57450f249366f 100644
--- a/tests/language/compile_time_constant2_test.dart
+++ b/tests/language/compile_time_constant2_test.dart
@@ -4,13 +4,14 @@
const x = 19;
const y = 3;
+const z = -5;
const g1 = x + y;
const g2 = x * y;
const g3 = x / y;
const g4 = x ~/ y;
const g5 = x << y;
const g6 = x >> y;
-const g7 = ~x;
+const g7 = ~z;
const g8 = -x;
const g9 = x < y;
const g10 = x <= y;
@@ -35,7 +36,7 @@ main() {
Expect.equals(6, g4);
Expect.equals(152, g5);
Expect.equals(2, g6);
- Expect.equals(-20, g7);
+ Expect.equals(4, g7);
Expect.equals(-19, g8);
Expect.equals(false, g9);
Expect.equals(false, g10);
@@ -50,6 +51,6 @@ main() {
Expect.equals(19, g19);
Expect.equals(3, g20);
Expect.equals(16, g21);
- Expect.equals(200, g22);
+ Expect.equals(224, g22);
Expect.equals(1, g23);
}

Powered by Google App Engine
This is Rietveld 408576698