OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library utf16_tests; | 5 library utf.utf16_test; |
| 6 |
6 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
7 import 'package:utf/utf.dart'; | 8 import 'package:utf/utf.dart'; |
8 | 9 |
9 const String testKoreanCharSubset = """ | 10 const String testKoreanCharSubset = """ |
10 가각갂갃간갅갆갇갈갉갊갋갌갍갎갏감갑값갓갔강갖갗갘같갚갛 | 11 가각갂갃간갅갆갇갈갉갊갋갌갍갎갏감갑값갓갔강갖갗갘같갚갛 |
11 개객갞갟갠갡갢갣갤갥갦갧갨갩갪갫갬갭갮갯갰갱갲갳갴갵갶갷 | 12 개객갞갟갠갡갢갣갤갥갦갧갨갩갪갫갬갭갮갯갰갱갲갳갴갵갶갷 |
12 갸갹갺갻갼갽갾갿걀걁걂걃걄걅걆걇걈걉걊걋걌걍걎걏걐걑걒걓"""; | 13 갸갹갺갻갼갽갾갿걀걁걂걃걄걅걆걇걈걉걊걋걌걍걎걏걐걑걒걓"""; |
13 | 14 |
14 const String testHanWater = "水"; | 15 const String testHanWater = "水"; |
15 | 16 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // specify types | 119 // specify types |
119 Expect.equals(44032, (new List<int> | 120 Expect.equals(44032, (new List<int> |
120 .from(decodeUtf16beAsIterable(testKoreanCharSubsetUtf16beBom)))[0]); | 121 .from(decodeUtf16beAsIterable(testKoreanCharSubsetUtf16beBom)))[0]); |
121 Expect.equals(44032, (new List<int> | 122 Expect.equals(44032, (new List<int> |
122 .from(decodeUtf16leAsIterable(testKoreanCharSubsetUtf16le)))[0]); | 123 .from(decodeUtf16leAsIterable(testKoreanCharSubsetUtf16le)))[0]); |
123 bool stripBom = false; | 124 bool stripBom = false; |
124 Expect.equals(UNICODE_BOM, (new List<int> | 125 Expect.equals(UNICODE_BOM, (new List<int> |
125 .from(decodeUtf16beAsIterable(testKoreanCharSubsetUtf16beBom, | 126 .from(decodeUtf16beAsIterable(testKoreanCharSubsetUtf16beBom, |
126 0, null, stripBom)))[0]); | 127 0, null, stripBom)))[0]); |
127 } | 128 } |
OLD | NEW |