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_core_tests"); | 6 library unicode_core_tests; |
7 #import("dunit.dart"); | 7 import 'dunit.dart'; |
8 #import("../../string_encoding/unicode_core.dart"); | 8 import '../../string_encoding/unicode_core.dart'; |
9 | 9 |
10 void main() { | 10 void main() { |
11 TestSuite suite = new TestSuite(); | 11 TestSuite suite = new TestSuite(); |
12 suite.registerTestClass(new UnicodeCoreTests()); | 12 suite.registerTestClass(new UnicodeCoreTests()); |
13 suite.run(); | 13 suite.run(); |
14 } | 14 } |
15 | 15 |
16 class UnicodeCoreTests extends TestClass { | 16 class UnicodeCoreTests extends TestClass { |
17 void registerTests(TestSuite suite) { | 17 void registerTests(TestSuite suite) { |
18 register("testPlatform", testPlatform, suite); | 18 register("testPlatform", testPlatform, suite); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 "d800 dbff last byte missing"); | 96 "d800 dbff last byte missing"); |
97 | 97 |
98 // impossible bytes | 98 // impossible bytes |
99 Expect.listEquals([0xfffd], utf16CodeUnitsToCodepoints([0x110000]), | 99 Expect.listEquals([0xfffd], utf16CodeUnitsToCodepoints([0x110000]), |
100 "110000 out of bounds"); | 100 "110000 out of bounds"); |
101 | 101 |
102 // overlong sequences not possible in utf16 (nothing < x10000) | 102 // overlong sequences not possible in utf16 (nothing < x10000) |
103 // illegal code positions d800-dfff not encodable (< x10000) | 103 // illegal code positions d800-dfff not encodable (< x10000) |
104 } | 104 } |
105 } | 105 } |
OLD | NEW |