Index: tests/language/const_map_test.dart |
diff --git a/tests/compiler/dart2js_extra/16407_test.dart b/tests/language/const_map_test.dart |
similarity index 53% |
copy from tests/compiler/dart2js_extra/16407_test.dart |
copy to tests/language/const_map_test.dart |
index aff1ba337ddab1eb5d219ac635653b48d4f8d1bc..de30f8a1fb9b49c4c6d76e6bc6eacce3a5166d10 100644 |
--- a/tests/compiler/dart2js_extra/16407_test.dart |
+++ b/tests/language/const_map_test.dart |
@@ -4,13 +4,13 @@ |
import "package:expect/expect.dart"; |
-// Regression test for Issue 16407. |
- |
-void main() { |
- foo(null, true); |
- foo('x', false); |
+confuse(x) { |
Lasse Reichstein Nielsen
2014/03/03 10:31:24
Document "confuse": Used to prevent static optimiz
floitsch
2014/03/03 10:42:38
Done.
|
+ if (new DateTime.now() == 42) return confuse(2); |
+ return x; |
} |
-var foo = (x, result) { |
- Expect.equals(result, x is Null, '$x is Null'); |
-}; |
+main() { |
+ // Make sure that const maps use the == operator and not identical. |
Lasse Reichstein Nielsen
2014/03/03 10:31:24
Way that the spec doesn't require this explicitly,
floitsch
2014/03/03 10:42:38
Added string test and added more comment.
|
+ var m = const { 1: 42 }; |
+ Expect.equals(42, m[confuse(1.0)]); |
+} |