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() { |