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

Unified Diff: dart/tests/corelib/safe_to_string_test.dart

Issue 10943027: Handle backslashes and newlines when escaping strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« dart/lib/core/errors.dart ('K') | « dart/runtime/lib/errors_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/corelib/safe_to_string_test.dart
diff --git a/dart/tests/corelib/safe_to_string_test.dart b/dart/tests/corelib/safe_to_string_test.dart
index 9a9379f58aec222e16179a6380ee738f88028fb3..a5b111789bc7a14854a3b53b757491b9ee1a3bba 100644
--- a/dart/tests/corelib/safe_to_string_test.dart
+++ b/dart/tests/corelib/safe_to_string_test.dart
@@ -10,6 +10,9 @@ main() {
Expect.stringEquals('"\'\'"', NoSuchMethodError.safeToString("''"));
Expect.stringEquals(r'"\""', NoSuchMethodError.safeToString('"'));
Expect.stringEquals(r'"\"\""', NoSuchMethodError.safeToString('""'));
+
+ Expect.stringEquals(r'"\\\"\n"', NoSuchMethodError.safeToString('\\"\n'));
+
Expect.stringEquals('null', NoSuchMethodError.safeToString(null));
Expect.stringEquals('true', NoSuchMethodError.safeToString(true));
Expect.stringEquals('false', NoSuchMethodError.safeToString(false));
« dart/lib/core/errors.dart ('K') | « dart/runtime/lib/errors_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698