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("utf8_tests"); | 6 #library("utf8_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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 466 |
467 IterableUtf8Decoder kataDecoder = decodeUtf8AsIterable(testKatakanaUtf8); | 467 IterableUtf8Decoder kataDecoder = decodeUtf8AsIterable(testKatakanaUtf8); |
468 // get the first character | 468 // get the first character |
469 Expect.equals(testKatakanaPhrase.charCodes()[0], | 469 Expect.equals(testKatakanaPhrase.charCodes()[0], |
470 kataDecoder.iterator().next()); | 470 kataDecoder.iterator().next()); |
471 // get the whole translation using the Iterable interface | 471 // get the whole translation using the Iterable interface |
472 Expect.stringEquals(testKatakanaPhrase, | 472 Expect.stringEquals(testKatakanaPhrase, |
473 new String.fromCharCodes(new List<int>.from(kataDecoder))); | 473 new String.fromCharCodes(new List<int>.from(kataDecoder))); |
474 } | 474 } |
475 } | 475 } |
OLD | NEW |