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

Unified Diff: tests/corelib_strong/format_exception_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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/corelib_strong/format_exception_test.dart
diff --git a/tests/corelib_strong/format_exception_test.dart b/tests/corelib_strong/format_exception_test.dart
index 121494cadbf8edce916ece58ea7577df4c26d0be..717b76bc4776780c0ea082a9654fae19f2188ee6 100644
--- a/tests/corelib_strong/format_exception_test.dart
+++ b/tests/corelib_strong/format_exception_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
library format_exception_test;
+
import "package:expect/expect.dart";
test(exn, message, source, offset, toString) {
@@ -28,14 +29,14 @@ main() {
test(e, "message", "source", null, "FormatException: message\nsource");
e = new FormatException("message", "source" * 25);
- test(e, "message", "source" * 25, null, "FormatException: message\n" +
- "source" * 12 + "sou...");
+ test(e, "message", "source" * 25, null,
+ "FormatException: message\n" + "source" * 12 + "sou...");
e = new FormatException("message", "source" * 25);
- test(e, "message", "source" * 25, null, "FormatException: message\n" +
- "source" * 12 + "sou...");
+ test(e, "message", "source" * 25, null,
+ "FormatException: message\n" + "source" * 12 + "sou...");
e = new FormatException("message", "s1\nsource\ns2");
- test(e, "message", "s1\nsource\ns2", null, "FormatException: message\n" +
- "s1\nsource\ns2");
+ test(e, "message", "s1\nsource\ns2", null,
+ "FormatException: message\n" + "s1\nsource\ns2");
var o = new Object();
e = new FormatException("message", o, 10);
@@ -43,31 +44,43 @@ main() {
e = new FormatException("message", "source", 3);
test(e, "message", "source", 3,
- "FormatException: message (at character 4)\nsource\n ^\n");
+ "FormatException: message (at character 4)\nsource\n ^\n");
e = new FormatException("message", "s1\nsource\ns2", 6);
test(e, "message", "s1\nsource\ns2", 6,
- "FormatException: message (at line 2, character 4)\nsource\n ^\n");
+ "FormatException: message (at line 2, character 4)\nsource\n ^\n");
- var longline = "watermelon cantaloupe " * 8 + "watermelon"; // Length > 160.
+ var longline = "watermelon cantaloupe " * 8 + "watermelon"; // Length > 160.
var longsource = (longline + "\n") * 25;
var line10 = (longline.length + 1) * 9;
e = new FormatException("message", longsource, line10);
- test(e, "message", longsource, line10,
- "FormatException: message (at line 10, character 1)\n"
- "${longline.substring(0, 75)}...\n^\n");
+ test(
+ e,
+ "message",
+ longsource,
+ line10,
+ "FormatException: message (at line 10, character 1)\n"
+ "${longline.substring(0, 75)}...\n^\n");
e = new FormatException("message", longsource, line10 - 1);
- test(e, "message", longsource, line10 - 1,
- "FormatException: message (at line 9, "
- "character ${longline.length + 1})\n"
- "...${longline.substring(longline.length - 75)}\n"
- "${' ' * 78}^\n");
+ test(
+ e,
+ "message",
+ longsource,
+ line10 - 1,
+ "FormatException: message (at line 9, "
+ "character ${longline.length + 1})\n"
+ "...${longline.substring(longline.length - 75)}\n"
+ "${' ' * 78}^\n");
var half = longline.length ~/ 2;
e = new FormatException("message", longsource, line10 + half);
- test(e, "message", longsource, line10 + half,
- "FormatException: message (at line 10, character ${half + 1})\n"
- "...${longline.substring(half - 36, half + 36)}...\n"
- "${' ' * 39}^\n");
+ test(
+ e,
+ "message",
+ longsource,
+ line10 + half,
+ "FormatException: message (at line 10, character ${half + 1})\n"
+ "...${longline.substring(half - 36, half + 36)}...\n"
+ "${' ' * 39}^\n");
}

Powered by Google App Engine
This is Rietveld 408576698