Index: tests/corelib/string_to_lower_case_test.dart |
diff --git a/tests/corelib/string_to_lower_case_test.dart b/tests/corelib/string_to_lower_case_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..458d69f355f6c1846a2a086d4c6ac7ec80a8fdca |
--- /dev/null |
+++ b/tests/corelib/string_to_lower_case_test.dart |
@@ -0,0 +1,18 @@ |
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+import "package:expect/expect.dart"; |
+ |
+void testOneByteSting() { |
+ // Compare one-byte-string toLowerCase with a two-byte-string toLowerCase. |
+ var oneByteString = new String.fromCharCodes( |
+ new List.generate(256, (i)=> i)); |
+ var twoByteString = new String.fromCharCodes( |
sra1
2014/03/25 21:29:13
This is probably a _OneByteString.
You have to do
Anders Johnsen
2014/03/25 21:37:48
Done.
|
+ new List.generate(512, (i)=> i)).substring(0, 256); |
+ Expect.listEquals(oneByteString.toLowerCase(), twoByteString.toLowerCase()); |
sra1
2014/03/25 21:29:13
Expect.equals.
(This will fail in checked mode si
Anders Johnsen
2014/03/25 21:37:48
Done.
|
+} |
+ |
+void main() { |
+ testOneByteSting(); |
+} |