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

Unified Diff: tests/language/string_escapes_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/language/static_inline_test.dart ('k') | tests/language/string_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/string_escapes_test.dart
diff --git a/tests/language/string_escapes_test.dart b/tests/language/string_escapes_test.dart
index 20a7beb4f77f22343efbfc43537ae25afc443c20..6e802142c76563e5be20d0149df6e1bda22eac48 100644
--- a/tests/language/string_escapes_test.dart
+++ b/tests/language/string_escapes_test.dart
@@ -15,43 +15,43 @@ class StringEscapesTest {
static testDelimited() {
String str = "Foo\u{1}Bar\u{000001}Baz\u{D7FF}Boo";
Expect.equals(15, str.length);
- Expect.equals(1, str.charCodeAt(3));
- Expect.equals(1, str.charCodeAt(7));
- Expect.equals(0xD7FF, str.charCodeAt(11));
- Expect.equals('B'.charCodeAt(0), str.charCodeAt(12));
+ Expect.equals(1, str.codeUnitAt(3));
+ Expect.equals(1, str.codeUnitAt(7));
+ Expect.equals(0xD7FF, str.codeUnitAt(11));
+ Expect.equals('B'.codeUnitAt(0), str.codeUnitAt(12));
}
static testEscapes() {
String str = "Foo\fBar\vBaz\bBoo";
Expect.equals(15, str.length);
- Expect.equals(12, str.charCodeAt(3));
- Expect.equals('B'.charCodeAt(0), str.charCodeAt(4));
- Expect.equals(11, str.charCodeAt(7));
- Expect.equals('z'.charCodeAt(0), str.charCodeAt(10));
- Expect.equals(8, str.charCodeAt(11));
- Expect.equals('o'.charCodeAt(0), str.charCodeAt(14));
+ Expect.equals(12, str.codeUnitAt(3));
+ Expect.equals('B'.codeUnitAt(0), str.codeUnitAt(4));
+ Expect.equals(11, str.codeUnitAt(7));
+ Expect.equals('z'.codeUnitAt(0), str.codeUnitAt(10));
+ Expect.equals(8, str.codeUnitAt(11));
+ Expect.equals('o'.codeUnitAt(0), str.codeUnitAt(14));
str = "Abc\rDef\nGhi\tJkl";
Expect.equals(15, str.length);
- Expect.equals(13, str.charCodeAt(3));
- Expect.equals('D'.charCodeAt(0), str.charCodeAt(4));
- Expect.equals(10, str.charCodeAt(7));
- Expect.equals('G'.charCodeAt(0), str.charCodeAt(8));
- Expect.equals(9, str.charCodeAt(11));
- Expect.equals('J'.charCodeAt(0), str.charCodeAt(12));
+ Expect.equals(13, str.codeUnitAt(3));
+ Expect.equals('D'.codeUnitAt(0), str.codeUnitAt(4));
+ Expect.equals(10, str.codeUnitAt(7));
+ Expect.equals('G'.codeUnitAt(0), str.codeUnitAt(8));
+ Expect.equals(9, str.codeUnitAt(11));
+ Expect.equals('J'.codeUnitAt(0), str.codeUnitAt(12));
}
static testFixed2() {
String str = "Foo\xFFBar";
Expect.equals(7, str.length);
- Expect.equals(255, str.charCodeAt(3));
- Expect.equals('B'.charCodeAt(0), str.charCodeAt(4));
+ Expect.equals(255, str.codeUnitAt(3));
+ Expect.equals('B'.codeUnitAt(0), str.codeUnitAt(4));
}
static testFixed4() {
String str = "Foo\u0001Bar";
Expect.equals(7, str.length);
- Expect.equals(1, str.charCodeAt(3));
- Expect.equals('B'.charCodeAt(0), str.charCodeAt(4));
+ Expect.equals(1, str.codeUnitAt(3));
+ Expect.equals('B'.codeUnitAt(0), str.codeUnitAt(4));
}
static testLiteral() {
« no previous file with comments | « tests/language/static_inline_test.dart ('k') | tests/language/string_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698