Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: pkg/utf/test/utf82_test.dart

Issue 418433003: pkg/utf: fixed layout, added todos, updated docs and homepage pubspec links (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/utf/test/utf32_test.dart ('k') | pkg/utf/test/utf8_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 utf.utf82_test;
6
5 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
6 import 'package:utf/utf.dart'; 8 import 'package:utf/utf.dart';
7 9
8 const String testEnglishPhrase = 10 const String testEnglishPhrase =
9 "The quick brown fox jumps over the lazy dog."; 11 "The quick brown fox jumps over the lazy dog.";
10 12
11 const List<int> testEnglishUtf8 = const<int> [ 13 const List<int> testEnglishUtf8 = const<int> [
12 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, 14 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63,
13 0x6b, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x6e, 0x20, 15 0x6b, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x6e, 0x20,
14 0x66, 0x6f, 0x78, 0x20, 0x6a, 0x75, 0x6d, 0x70, 16 0x66, 0x6f, 0x78, 0x20, 0x6a, 0x75, 0x6d, 0x70,
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 Expect.stringEquals(testEnglishPhrase, 456 Expect.stringEquals(testEnglishPhrase,
455 new String.fromCharCodes(new List<int>.from(englishDecoder))); 457 new String.fromCharCodes(new List<int>.from(englishDecoder)));
456 458
457 IterableUtf8Decoder kataDecoder = decodeUtf8AsIterable(testKatakanaUtf8); 459 IterableUtf8Decoder kataDecoder = decodeUtf8AsIterable(testKatakanaUtf8);
458 // get the first character 460 // get the first character
459 Expect.equals(testKatakanaPhrase.codeUnits[0], kataDecoder.first); 461 Expect.equals(testKatakanaPhrase.codeUnits[0], kataDecoder.first);
460 // get the whole translation using the Iterable interface 462 // get the whole translation using the Iterable interface
461 Expect.stringEquals(testKatakanaPhrase, 463 Expect.stringEquals(testKatakanaPhrase,
462 new String.fromCharCodes(new List<int>.from(kataDecoder))); 464 new String.fromCharCodes(new List<int>.from(kataDecoder)));
463 } 465 }
OLDNEW
« no previous file with comments | « pkg/utf/test/utf32_test.dart ('k') | pkg/utf/test/utf8_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698