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

Unified Diff: tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart

Issue 221873002: Compute frontend/backend specific constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes Created 6 years, 8 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/compiler/dart2js/mirrors_used_test.dart ('k') | tests/compiler/dart2js_extra/minus_zero_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart
diff --git a/tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart b/tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart
index 49dcb36f0fd1c2e3aeba79093549c20dee6617d2..98bce8f8004cde9f57b8ad4ecea425e4d59c7d09 100644
--- a/tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart
+++ b/tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart
@@ -11,10 +11,10 @@ const y = 12345678901234567890;
const z = x - y;
const a = 1.0;
-const b = a << 3; // This would not be valid with Dart semantics.
+const b = a << 3; /// 01: compile-time error
const c = -0.0;
-const d = c << 1; // This would not be valid with Dart semantics.
+const d = c << 1; /// 02: compile-time error
foo() => 12345678901234567891 - 12345678901234567890;
@@ -24,11 +24,11 @@ main() {
Expect.equals(0, foo());
Expect.isTrue(x is double);
Expect.isTrue(x is int);
- Expect.equals(8, b);
- Expect.equals(8, 1.0 << 3); // This would not be valid with Dart semantics.
+ Expect.equals(8, b); /// 01: continued
+ Expect.equals(8, 1.0 << 3); /// 03: static type warning
Expect.isTrue(1 == 1.0);
- Expect.equals(0, d);
- Expect.equals(0, -0.0 << 1); // This would not be valid with Dart semantics.
+ Expect.equals(0, d); /// 02: continued
+ Expect.equals(0, -0.0 << 1); /// 04: static type warning
// Make sure the 1 is not shifted into the 32 bit range.
Expect.equals(0, 0x100000000 >> 3);
// The dynamic int-check also allows -0.0.
« no previous file with comments | « tests/compiler/dart2js/mirrors_used_test.dart ('k') | tests/compiler/dart2js_extra/minus_zero_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698