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

Unified Diff: tests/corelib/string_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/string_fromcharcode_test.dart ('k') | tests/corelib/strings_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/string_test.dart
diff --git a/tests/corelib/string_test.dart b/tests/corelib/string_test.dart
index 15181815dcce8c7691cdd4978adc43b8af7cb3bf..2dd329c7d6b3d7f02ca690eb1628122c9c6f6efe 100644
--- a/tests/corelib/string_test.dart
+++ b/tests/corelib/string_test.dart
@@ -10,7 +10,7 @@ class StringTest {
testIllegalArgument();
testConcat();
testIndex();
- testCharCodeAt();
+ testCodeUnitAt();
testEquals();
testEndsWith();
testStartsWith();
@@ -19,7 +19,6 @@ class StringTest {
testContains();
testReplaceAll();
testCompareTo();
- testToList();
testCharCodes();
}
@@ -56,10 +55,10 @@ class StringTest {
}
}
- static testCharCodeAt() {
+ static testCodeUnitAt() {
String str = "string";
for (int i = 0; i < str.length; i++) {
- Expect.equals(true, str.charCodeAt(i) is int);
+ Expect.equals(true, str.codeUnitAt(i) is int);
}
}
@@ -271,25 +270,12 @@ class StringTest {
Expect.equals(-1, "".compareTo("string"));
}
- static testToList() {
- test(str) {
- var list = str.splitChars();
- Expect.equals(str.length, list.length);
- for (int i = 0; i < str.length; i++) {
- Expect.equals(str[i], list[i]);
- }
- }
- test("abc");
- test("");
- test(" ");
- }
-
static testCharCodes() {
test(str) {
- var list = str.charCodes;
+ var list = str.codeUnits;
Expect.equals(str.length, list.length);
for (int i = 0; i < str.length; i++) {
- Expect.equals(str.charCodeAt(i), list[i]);
+ Expect.equals(str.codeUnitAt(i), list[i]);
}
}
test("abc");
« no previous file with comments | « tests/corelib/string_fromcharcode_test.dart ('k') | tests/corelib/strings_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698