Index: tests/language/const_string_test.dart |
diff --git a/tests/language/const_string_test.dart b/tests/language/const_string_test.dart |
index 4736ca49f12501a07e6f9b1335154e43b4053c16..13f1a9cb73a76632650dc38819d36b48a28d51ac 100644 |
--- a/tests/language/const_string_test.dart |
+++ b/tests/language/const_string_test.dart |
@@ -6,6 +6,8 @@ import "package:expect/expect.dart"; |
// Exercises compile-time string constants |
+const yz = "y" + "z"; |
+ |
main() { |
// Constant comparisons are independent of the quotes used. |
Expect.isTrue(identical("abcd", 'abcd')); |
@@ -34,4 +36,16 @@ main() { |
Expect.isTrue(identical('a\'b\'cd', "a" "'b'" 'c' "d")); |
Expect.isTrue(identical('a"b"cd', 'a' '"b"' 'c' "d")); |
Expect.isTrue(identical("a\"b\"cd", 'a' '"b"' 'c' "d")); |
+ |
+ const a = identical("ab", "a" + "b"); |
+ Expect.isTrue(a); |
+ |
+ const b = identical("xyz", "x" + yz); |
+ Expect.isTrue(b); |
+ |
+ const c = identical("12", "1" "2"); |
+ Expect.isTrue(c); |
+ |
+ const d = identical("zyz", "z$yz"); |
+ Expect.isTrue(d); |
Lasse Reichstein Nielsen
2016/01/05 18:55:13
Maybe also test without the const declarations.
An
Lasse Reichstein Nielsen
2016/01/05 18:56:15
(I think it will succeed after this patch, I just
hausner
2016/01/05 19:05:34
I've talked to Gilad about this. He said that the
|
} |