OLD | NEW |
---|---|
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 library unicode_tests; | 6 library unicode_tests; |
7 import 'dunit.dart'; | 7 import 'dunit.dart'; |
8 import '../../../lib/utf/utf.dart'; | 8 import '../../../lib/utf/utf.dart'; |
9 | 9 |
10 void main() { | 10 void main() { |
(...skipping 12 matching lines...) Expand all Loading... | |
23 32, 116, 104, 101, 32, 108, 97, 122, 121, 32, 100, 111, 103, 46]; | 23 32, 116, 104, 101, 32, 108, 97, 122, 121, 32, 100, 111, 103, 46]; |
24 | 24 |
25 void registerTests(TestSuite suite) { | 25 void registerTests(TestSuite suite) { |
26 register("testCodepointsToString", testCodepointsToString, suite); | 26 register("testCodepointsToString", testCodepointsToString, suite); |
27 register("testStringCharCodes", testStringCharCodes, suite); | 27 register("testStringCharCodes", testStringCharCodes, suite); |
28 register("testEmptyStringFromCharCodes", testEmptyStringFromCharCodes, suite ); | 28 register("testEmptyStringFromCharCodes", testEmptyStringFromCharCodes, suite ); |
29 register("testEmptyStringCharCodes", testEmptyStringCharCodes, suite); | 29 register("testEmptyStringCharCodes", testEmptyStringCharCodes, suite); |
30 } | 30 } |
31 | 31 |
32 void testStringCharCodes() { | 32 void testStringCharCodes() { |
33 Expect.listEquals(testCodepoints, testPhrase.charCodes()); | 33 Expect.listEquals(testCodepoints, testPhrase.codeUnits()); |
floitsch
2013/02/19 14:03:06
that looks wrong: codeUnits is a getter.
Lasse Reichstein Nielsen
2013/02/20 06:38:23
This code is definitly not running anywhere. The d
| |
34 } | 34 } |
35 | 35 |
36 void testCodepointsToString() { | 36 void testCodepointsToString() { |
37 Expect.stringEquals(testPhrase, new String.fromCharCodes(testCodepoints)); | 37 Expect.stringEquals(testPhrase, new String.fromCharCodes(testCodepoints)); |
38 } | 38 } |
39 | 39 |
40 void testEmptyStringFromCharCodes() { | 40 void testEmptyStringFromCharCodes() { |
41 Expect.stringEquals("", new String.fromCharCodes(<int>[])); | 41 Expect.stringEquals("", new String.fromCharCodes(<int>[])); |
42 } | 42 } |
43 | 43 |
44 void testEmptyStringCharCodes() { | 44 void testEmptyStringCharCodes() { |
45 Expect.listEquals([], "".charCodes()); | 45 Expect.listEquals([], "".codeUnits()); |
floitsch
2013/02/19 14:03:06
ditto.
Lasse Reichstein Nielsen
2013/02/20 06:38:23
Done.
| |
46 } | 46 } |
47 } | 47 } |
OLD | NEW |