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

Side by Side Diff: tests/lib/convert/unicode_tests.dart

Issue 649113005: Make JSON parsing work as a chunked conversion sink. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Fix bug. Created 6 years, 1 month 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/lib/convert/json_utf8_chunk_test.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 unicode_tests; 5 library unicode_tests;
6 6
7 // Google favorite: "Îñţérñåţîöñåļîžåţîờñ". 7 // Google favorite: "Îñţérñåţîöñåļîžåţîờñ".
8 const INTER_BYTES = const [0xc3, 0x8e, 0xc3, 0xb1, 0xc5, 0xa3, 0xc3, 0xa9, 0x72, 8 const INTER_BYTES = const [0xc3, 0x8e, 0xc3, 0xb1, 0xc5, 0xa3, 0xc3, 0xa9, 0x72,
9 0xc3, 0xb1, 0xc3, 0xa5, 0xc5, 0xa3, 0xc3, 0xae, 0xc3, 9 0xc3, 0xb1, 0xc3, 0xa5, 0xc5, 0xa3, 0xc3, 0xae, 0xc3,
10 0xb6, 0xc3, 0xb1, 0xc3, 0xa5, 0xc4, 0xbc, 0xc3, 0xae, 10 0xb6, 0xc3, 0xb1, 0xc3, 0xa5, 0xc4, 0xbc, 0xc3, 0xae,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 const [ SMALLEST_3_UTF8_UNIT_BYTES, SMALLEST_3_UTF8_UNIT_STRING ], 81 const [ SMALLEST_3_UTF8_UNIT_BYTES, SMALLEST_3_UTF8_UNIT_STRING ],
82 const [ BIGGEST_3_UTF8_UNIT_BYTES, BIGGEST_3_UTF8_UNIT_STRING ], 82 const [ BIGGEST_3_UTF8_UNIT_BYTES, BIGGEST_3_UTF8_UNIT_STRING ],
83 const [ SMALLEST_4_UTF8_UNIT_BYTES, SMALLEST_4_UTF8_UNIT_STRING ], 83 const [ SMALLEST_4_UTF8_UNIT_BYTES, SMALLEST_4_UTF8_UNIT_STRING ],
84 const [ BIGGEST_4_UTF8_UNIT_BYTES, BIGGEST_4_UTF8_UNIT_STRING ], 84 const [ BIGGEST_4_UTF8_UNIT_BYTES, BIGGEST_4_UTF8_UNIT_STRING ],
85 ]; 85 ];
86 86
87 List<List> _expandTestPairs() { 87 List<List> _expandTestPairs() {
88 assert(2 == BEE_STRING.length); 88 assert(2 == BEE_STRING.length);
89 var tests = []; 89 var tests = [];
90 tests.addAll(_TEST_PAIRS); 90 tests.addAll(_TEST_PAIRS);
91 tests.addAll(_TEST_PAIRS.expand((test) { 91 tests.addAll(_TEST_PAIRS.map((test) {
92 var bytes = test[0]; 92 var bytes = test[0];
93 var string = test[1]; 93 var string = test[1];
94 var longBytes = []; 94 var longBytes = [];
95 var longString = ""; 95 var longString = "";
96 for (int i = 0; i < 100; i++) { 96 for (int i = 0; i < 100; i++) {
97 longBytes.addAll(bytes); 97 longBytes.addAll(bytes);
98 longString += string; 98 longString += string;
99 } 99 }
100 return [test, [longBytes, longString]]; 100 return [longBytes, longString];
101 })); 101 }));
102 return tests; 102 return tests;
103 } 103 }
104 104
105 final List UNICODE_TESTS = _expandTestPairs(); 105 final List UNICODE_TESTS = _expandTestPairs();
OLDNEW
« no previous file with comments | « tests/lib/convert/json_utf8_chunk_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698