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("utf16_tests"); | 6 library utf16_tests; |
7 #import("dunit.dart"); | 7 import 'dunit.dart'; |
8 #import("../../string_encoding/unicode_core.dart"); | 8 import '../../string_encoding/unicode_core.dart'; |
9 #import("../../string_encoding/utf16.dart"); | 9 import '../../string_encoding/utf16.dart'; |
10 | 10 |
11 void main() { | 11 void main() { |
12 TestSuite suite = new TestSuite(); | 12 TestSuite suite = new TestSuite(); |
13 suite.registerTestClass(new Utf16Tests()); | 13 suite.registerTestClass(new Utf16Tests()); |
14 suite.run(); | 14 suite.run(); |
15 } | 15 } |
16 | 16 |
17 class Utf16Tests extends TestClass { | 17 class Utf16Tests extends TestClass { |
18 static const String testKoreanCharSubset = """ | 18 static const String testKoreanCharSubset = """ |
19 가각갂갃간갅갆갇갈갉갊갋갌갍갎갏감갑값갓갔강갖갗갘같갚갛 | 19 가각갂갃간갅갆갇갈갉갊갋갌갍갎갏감갑값갓갔강갖갗갘같갚갛 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // specify types | 127 // specify types |
128 Expect.equals(44032, (new List<int> | 128 Expect.equals(44032, (new List<int> |
129 .from(decodeUtf16beAsIterable(testKoreanCharSubsetUtf16beBom)))[0]); | 129 .from(decodeUtf16beAsIterable(testKoreanCharSubsetUtf16beBom)))[0]); |
130 Expect.equals(44032, (new List<int> | 130 Expect.equals(44032, (new List<int> |
131 .from(decodeUtf16leAsIterable(testKoreanCharSubsetUtf16le)))[0]); | 131 .from(decodeUtf16leAsIterable(testKoreanCharSubsetUtf16le)))[0]); |
132 Expect.equals(UNICODE_BOM, (new List<int> | 132 Expect.equals(UNICODE_BOM, (new List<int> |
133 .from(decodeUtf16beAsIterable(testKoreanCharSubsetUtf16beBom, | 133 .from(decodeUtf16beAsIterable(testKoreanCharSubsetUtf16beBom, |
134 stripBom: false)))[0]); | 134 stripBom: false)))[0]); |
135 } | 135 } |
136 } | 136 } |
OLD | NEW |