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

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

Issue 8231031: Check for compile-time constants in DartCompiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Feedback from floitsch Created 9 years, 2 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/src/StringInterpolate2Test.dart
diff --git a/tests/language/src/StringInterpolate2Test.dart b/tests/language/src/StringInterpolate2Test.dart
index 3d7f06e5142ab308980e949c13ff64b3ff9fa414..fe4e6a82deb926203d8c445bdaaca890a3090326 100644
--- a/tests/language/src/StringInterpolate2Test.dart
+++ b/tests/language/src/StringInterpolate2Test.dart
@@ -6,10 +6,12 @@
class StringInterpolate2Test {
- static final F1 = "1 + 5 = ${1+5}";
+ static var F1;
static void testMain() {
-
+
+ F1 = "1 + 5 = ${1+5}";
+
Expect.equals("1 + 5 = 6", F1);
var fib = [1, 1, 2, 3, 5, 8, 13, 21];
@@ -26,8 +28,11 @@ class StringInterpolate2Test {
Expect.equals("5 squared is 25", s);
Expect.equals("8", "${fib.length}");
+ // test single quote
+ Expect.equals("8", '${fib.length}');
+ // test multi-line
Expect.equals("8", '${fib.
- length}');
+ length}');
zundel 2011/10/17 10:43:49 (here's what I did with the test in question)
var map = { "red": 1, "green": 2, "blue": 3 };
s = "green has value ${map["green"]}";

Powered by Google App Engine
This is Rietveld 408576698