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

Side by Side Diff: tests/standalone/io/string_stream_test.dart

Issue 11411092: Revert "Add some support for the code-point code-unit distinction." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « tests/language/language_dart2js.status ('k') | tests/utils/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 #import("dart:io"); 5 #import("dart:io");
6 #import("dart:isolate"); 6 #import("dart:isolate");
7 7
8 void testUtf8() { 8 void testUtf8() {
9 List<int> data = [0x01, 9 List<int> data = [0x01,
10 0x7f, 10 0x7f,
(...skipping 11 matching lines...) Expand all
22 Expect.equals(8, s.length); 22 Expect.equals(8, s.length);
23 Expect.equals(new String.fromCharCodes([0x01]), s[0]); 23 Expect.equals(new String.fromCharCodes([0x01]), s[0]);
24 Expect.equals(new String.fromCharCodes([0x7f]), s[1]); 24 Expect.equals(new String.fromCharCodes([0x7f]), s[1]);
25 Expect.equals(new String.fromCharCodes([0x80]), s[2]); 25 Expect.equals(new String.fromCharCodes([0x80]), s[2]);
26 Expect.equals(new String.fromCharCodes([0x7ff]), s[3]); 26 Expect.equals(new String.fromCharCodes([0x7ff]), s[3]);
27 Expect.equals(new String.fromCharCodes([0x800]), s[4]); 27 Expect.equals(new String.fromCharCodes([0x800]), s[4]);
28 Expect.equals(new String.fromCharCodes([0xffff]), s[5]); 28 Expect.equals(new String.fromCharCodes([0xffff]), s[5]);
29 Expect.equals(new String.fromCharCodes([0xffff]), s[5]); 29 Expect.equals(new String.fromCharCodes([0xffff]), s[5]);
30 30
31 // Surrogate pair for U+1D11E. 31 // Surrogate pair for U+1D11E.
32 Expect.equals(new String.fromCodeUnits([0xd834, 0xdd1e]), 32 Expect.equals(new String.fromCharCodes([0xd834]), s[6]);
33 s.substring(6, 8)); 33 Expect.equals(new String.fromCharCodes([0xdd1e]), s[7]);
34 } 34 }
35 stream.onData = stringData; 35 stream.onData = stringData;
36 } 36 }
37 37
38 void testLatin1() { 38 void testLatin1() {
39 List<int> data = [0x01, 39 List<int> data = [0x01,
40 0x7f, 40 0x7f,
41 0x44, 0x61, 0x72, 0x74, 41 0x44, 0x61, 0x72, 0x74,
42 0x80, 42 0x80,
43 0xff]; 43 0xff];
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 testUtf8(); 326 testUtf8();
327 testLatin1(); 327 testLatin1();
328 testAscii(); 328 testAscii();
329 testReadLine1(); 329 testReadLine1();
330 testReadLine2(); 330 testReadLine2();
331 testReadChunks(); 331 testReadChunks();
332 testReadMixed(); 332 testReadMixed();
333 testErrorHandler(); 333 testErrorHandler();
334 testEncodingErrorWithHandler(); 334 testEncodingErrorWithHandler();
335 } 335 }
OLDNEW
« no previous file with comments | « tests/language/language_dart2js.status ('k') | tests/utils/utf8_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698