Index: tests/corelib/collection_to_string_test.dart |
diff --git a/tests/corelib/collection_to_string_test.dart b/tests/corelib/collection_to_string_test.dart |
index 694aa0f5efc04c03937f42b28791df1f7cf4edfb..3f07236343a8809c2e72458111ebe7f3c185b28b 100644 |
--- a/tests/corelib/collection_to_string_test.dart |
+++ b/tests/corelib/collection_to_string_test.dart |
@@ -299,7 +299,8 @@ bool randomBool() { |
/** Returns the alphabetized characters in a string. */ |
String alphagram(String s) { |
- List<int> chars = s.charCodes; |
+ // Calling [toList] to convert unmodifiable list to normal list. |
+ List<int> chars = s.codeUnits.toList(); |
chars.sort((int a, int b) => a - b); |
return new String.fromCharCodes(chars); |
} |