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

Unified Diff: tests/corelib_2/format_exception_test.dart

Issue 2989643002: Migrate test block 8 to Dart 2.0. (Closed)
Patch Set: Merge Created 3 years, 4 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
« no previous file with comments | « tests/corelib_2/for_in_test.dart ('k') | tests/corelib_2/from_environment_const_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib_2/format_exception_test.dart
diff --git a/tests/corelib_strong/format_exception_test.dart b/tests/corelib_2/format_exception_test.dart
similarity index 84%
rename from tests/corelib_strong/format_exception_test.dart
rename to tests/corelib_2/format_exception_test.dart
index 717b76bc4776780c0ea082a9654fae19f2188ee6..a2e89e6194cca793fa7a7d2abb2a33c5547ea384 100644
--- a/tests/corelib_strong/format_exception_test.dart
+++ b/tests/corelib_2/format_exception_test.dart
@@ -83,4 +83,26 @@ main() {
"FormatException: message (at line 10, character ${half + 1})\n"
"...${longline.substring(half - 36, half + 36)}...\n"
"${' ' * 39}^\n");
+
+ var sourceNL = "\nsource with leading NL";
+ e = new FormatException("message", sourceNL, 2);
+ test(
+ e,
+ "message",
+ sourceNL,
+ 2,
+ "FormatException: message (at line 2, character 2)\n"
+ "source with leading NL\n"
+ " ^\n");
+
+ var sourceNL2 = "\n\nsource with leading NL";
+ e = new FormatException("message", sourceNL2, 2);
+ test(
+ e,
+ "message",
+ sourceNL2,
+ 2,
+ "FormatException: message (at line 3, character 1)\n"
+ "source with leading NL\n"
+ "^\n");
}
« no previous file with comments | « tests/corelib_2/for_in_test.dart ('k') | tests/corelib_2/from_environment_const_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698