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

Unified Diff: tests/corelib/json_test.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 10 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/is_operator_basic_types_test.dart ('k') | tests/corelib/string_base_vm_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/json_test.dart
diff --git a/tests/corelib/json_test.dart b/tests/corelib/json_test.dart
index 8d0f2dacc5838c14a202ab25a1b943d9f7f5a5b5..5a36d999642e7ef787ee6a3d4b43882c9a2c1f80 100644
--- a/tests/corelib/json_test.dart
+++ b/tests/corelib/json_test.dart
@@ -40,8 +40,8 @@ String escape(String s) {
var sb = new StringBuffer();
for (int i = 0; i < s.length; i++) {
int code = s.codeUnitAt(i);
- if (code == '\\'.charCodeAt(0)) sb.write(r'\\');
- else if (code == '\"'.charCodeAt(0)) sb.write(r'\"');
+ if (code == '\\'.codeUnitAt(0)) sb.write(r'\\');
+ else if (code == '\"'.codeUnitAt(0)) sb.write(r'\"');
else if (code >= 32 && code < 127) sb.writeCharCode(code);
else {
String hex = '000${code.toRadixString(16)}';
« no previous file with comments | « tests/corelib/is_operator_basic_types_test.dart ('k') | tests/corelib/string_base_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698