| Index: tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart
|
| diff --git a/tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart b/tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart
|
| index 461bcfea6a4d4787e0cd612b364f800988e39c77..ab10b078c362e09b439dad2dcc1e8b820ace7300 100644
|
| --- a/tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart
|
| +++ b/tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart
|
| @@ -20,7 +20,6 @@ bool bfun() => true;
|
| String sfun() => "sfun";
|
| void nfun() => null;
|
|
|
| -
|
| void testEscapes() {
|
| // Test that escaping the '$' prevents string interpolation.
|
| String x = inscrutable("NOT HERE");
|
| @@ -34,7 +33,6 @@ void testEscapes() {
|
| Expect.equals(r'a$x', """a\$x""");
|
| }
|
|
|
| -
|
| void testMultiLine() {
|
| var a = inscrutable("string");
|
| var b = inscrutable(42);
|
| @@ -59,17 +57,20 @@ void testMultiLine() {
|
|
|
| // Newlines at beginning of multiline strings are not included, but only
|
| // if they are in the source.
|
| - Expect.equals("\n", """${''}
|
| + Expect.equals(
|
| + "\n",
|
| + """${''}
|
| """);
|
| Expect.equals("\r", """${''}
|
| """);
|
| - Expect.equals("\r\n", """${''}
|
| + Expect.equals(
|
| + "\r\n",
|
| + """${''}
|
| """);
|
| Expect.equals("\n", """${'\n'}""");
|
| Expect.equals("\r", """${'\r'}""");
|
| Expect.equals("\r\n", """${'\r\n'}""");
|
| }
|
|
|
| -
|
| void testSimple() {
|
| var a = inscrutable("string");
|
| var b = inscrutable(42);
|
| @@ -91,17 +92,16 @@ void testSimple() {
|
| Expect.equals("423.1415falsenull!string", "$b$c$d$n!$a");
|
|
|
| // Function calls as expressions.
|
| - Expect.equals("sfun372.71828truenull",
|
| - "${sfun()}${ifun()}${dfun()}${bfun()}${nfun()}");
|
| - Expect.equals("nullsfun372.71828true",
|
| - "${nfun()}${sfun()}${ifun()}${dfun()}${bfun()}");
|
| - Expect.equals("truenullsfun372.71828",
|
| - "${bfun()}${nfun()}${sfun()}${ifun()}${dfun()}");
|
| - Expect.equals("2.71828truenullsfun37",
|
| - "${dfun()}${bfun()}${nfun()}${sfun()}${ifun()}");
|
| - Expect.equals("372.71828truenullsfun",
|
| - "${ifun()}${dfun()}${bfun()}${nfun()}${sfun()}");
|
| -
|
| + Expect.equals(
|
| + "sfun372.71828truenull", "${sfun()}${ifun()}${dfun()}${bfun()}${nfun()}");
|
| + Expect.equals(
|
| + "nullsfun372.71828true", "${nfun()}${sfun()}${ifun()}${dfun()}${bfun()}");
|
| + Expect.equals(
|
| + "truenullsfun372.71828", "${bfun()}${nfun()}${sfun()}${ifun()}${dfun()}");
|
| + Expect.equals(
|
| + "2.71828truenullsfun37", "${dfun()}${bfun()}${nfun()}${sfun()}${ifun()}");
|
| + Expect.equals(
|
| + "372.71828truenullsfun", "${ifun()}${dfun()}${bfun()}${nfun()}${sfun()}");
|
|
|
| // String contents around interpolated parts.
|
| Expect.equals("stringstring", "$a$a");
|
| @@ -125,7 +125,6 @@ void testSimple() {
|
| Expect.equals("42", "${'${"${'${"${'${"$b"}'}"}'}"}'}");
|
| }
|
|
|
| -
|
| void main() {
|
| testSimple();
|
| testMultiLine();
|
|
|