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

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

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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/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();
« no previous file with comments | « tests/compiler/dart2js_extra/string_escape_test.dart ('k') | tests/compiler/dart2js_extra/string_interpolation_opt1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698