| OLD | NEW |
| 1 dart_library.library('lib/convert/chunked_conversion_utf88_test', null, /* Impor
ts */[ | 1 dart_library.library('lib/convert/chunked_conversion_utf88_test', null, /* Impor
ts */[ |
| 2 'dart_sdk', | 2 'dart_sdk', |
| 3 'expect' | 3 'expect' |
| 4 ], function load__chunked_conversion_utf88_test(exports, dart_sdk, expect) { | 4 ], function load__chunked_conversion_utf88_test(exports, dart_sdk, expect) { |
| 5 'use strict'; | 5 'use strict'; |
| 6 const core = dart_sdk.core; | 6 const core = dart_sdk.core; |
| 7 const convert = dart_sdk.convert; | 7 const convert = dart_sdk.convert; |
| 8 const _interceptors = dart_sdk._interceptors; | 8 const _interceptors = dart_sdk._interceptors; |
| 9 const dart = dart_sdk.dart; | 9 const dart = dart_sdk.dart; |
| 10 const dartx = dart_sdk.dartx; | 10 const dartx = dart_sdk.dartx; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 let UTF8_TRAILING = const$1 || (const$1 = dart.constList([237, 176, 146], co
re.int)); | 126 let UTF8_TRAILING = const$1 || (const$1 = dart.constList([237, 176, 146], co
re.int)); |
| 127 let CHAR_A = 97; | 127 let CHAR_A = 97; |
| 128 let tests = []; | 128 let tests = []; |
| 129 let codeUnits = JSArrayOfint().of([]); | 129 let codeUnits = JSArrayOfint().of([]); |
| 130 for (let i = 0; i < 2049; i++) { | 130 for (let i = 0; i < 2049; i++) { |
| 131 codeUnits[dartx.length] = i + 1; | 131 codeUnits[dartx.length] = i + 1; |
| 132 codeUnits[dartx.set](i, CHAR_A); | 132 codeUnits[dartx.set](i, CHAR_A); |
| 133 if (i > 20 && dart.notNull(chunked_conversion_utf88_test._nextPowerOf2(i -
2)) - i > 10) continue; | 133 if (i > 20 && dart.notNull(chunked_conversion_utf88_test._nextPowerOf2(i -
2)) - i > 10) continue; |
| 134 codeUnits[dartx.set](i, LEADING_SURROGATE); | 134 codeUnits[dartx.set](i, LEADING_SURROGATE); |
| 135 let str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 135 let str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 136 let bytes = core.List.filled(i + 3, CHAR_A); | 136 let bytes = ListOfint().filled(i + 3, CHAR_A); |
| 137 bytes[dartx.set](i, UTF8_LEADING[dartx.get](0)); | 137 bytes[dartx.set](i, UTF8_LEADING[dartx.get](0)); |
| 138 bytes[dartx.set](i + 1, UTF8_LEADING[dartx.get](1)); | 138 bytes[dartx.set](i + 1, UTF8_LEADING[dartx.get](1)); |
| 139 bytes[dartx.set](i + 2, UTF8_LEADING[dartx.get](2)); | 139 bytes[dartx.set](i + 2, UTF8_LEADING[dartx.get](2)); |
| 140 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 140 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 141 codeUnits[dartx.set](i, TRAILING_SURROGATE); | 141 codeUnits[dartx.set](i, TRAILING_SURROGATE); |
| 142 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 142 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 143 bytes = core.List.filled(i + 3, CHAR_A); | 143 bytes = ListOfint().filled(i + 3, CHAR_A); |
| 144 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); | 144 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); |
| 145 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); | 145 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); |
| 146 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); | 146 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); |
| 147 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 147 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 148 codeUnits[dartx.length] = i + 2; | 148 codeUnits[dartx.length] = i + 2; |
| 149 codeUnits[dartx.set](i, LEADING_SURROGATE); | 149 codeUnits[dartx.set](i, LEADING_SURROGATE); |
| 150 codeUnits[dartx.set](i + 1, TRAILING_SURROGATE); | 150 codeUnits[dartx.set](i + 1, TRAILING_SURROGATE); |
| 151 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 151 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 152 bytes = core.List.filled(i + 4, CHAR_A); | 152 bytes = ListOfint().filled(i + 4, CHAR_A); |
| 153 bytes[dartx.set](i, UTF8_ENCODING[dartx.get](0)); | 153 bytes[dartx.set](i, UTF8_ENCODING[dartx.get](0)); |
| 154 bytes[dartx.set](i + 1, UTF8_ENCODING[dartx.get](1)); | 154 bytes[dartx.set](i + 1, UTF8_ENCODING[dartx.get](1)); |
| 155 bytes[dartx.set](i + 2, UTF8_ENCODING[dartx.get](2)); | 155 bytes[dartx.set](i + 2, UTF8_ENCODING[dartx.get](2)); |
| 156 bytes[dartx.set](i + 3, UTF8_ENCODING[dartx.get](3)); | 156 bytes[dartx.set](i + 3, UTF8_ENCODING[dartx.get](3)); |
| 157 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 157 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 158 codeUnits[dartx.set](i, TRAILING_SURROGATE); | 158 codeUnits[dartx.set](i, TRAILING_SURROGATE); |
| 159 codeUnits[dartx.set](i + 1, TRAILING_SURROGATE); | 159 codeUnits[dartx.set](i + 1, TRAILING_SURROGATE); |
| 160 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 160 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 161 bytes = core.List.filled(i + 6, CHAR_A); | 161 bytes = ListOfint().filled(i + 6, CHAR_A); |
| 162 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); | 162 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); |
| 163 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); | 163 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); |
| 164 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); | 164 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); |
| 165 bytes[dartx.set](i + 3, UTF8_TRAILING[dartx.get](0)); | 165 bytes[dartx.set](i + 3, UTF8_TRAILING[dartx.get](0)); |
| 166 bytes[dartx.set](i + 4, UTF8_TRAILING[dartx.get](1)); | 166 bytes[dartx.set](i + 4, UTF8_TRAILING[dartx.get](1)); |
| 167 bytes[dartx.set](i + 5, UTF8_TRAILING[dartx.get](2)); | 167 bytes[dartx.set](i + 5, UTF8_TRAILING[dartx.get](2)); |
| 168 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 168 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 169 codeUnits[dartx.set](i, LEADING_SURROGATE); | 169 codeUnits[dartx.set](i, LEADING_SURROGATE); |
| 170 codeUnits[dartx.set](i + 1, LEADING_SURROGATE); | 170 codeUnits[dartx.set](i + 1, LEADING_SURROGATE); |
| 171 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 171 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 172 bytes = core.List.filled(i + 6, CHAR_A); | 172 bytes = ListOfint().filled(i + 6, CHAR_A); |
| 173 bytes[dartx.set](i, UTF8_LEADING[dartx.get](0)); | 173 bytes[dartx.set](i, UTF8_LEADING[dartx.get](0)); |
| 174 bytes[dartx.set](i + 1, UTF8_LEADING[dartx.get](1)); | 174 bytes[dartx.set](i + 1, UTF8_LEADING[dartx.get](1)); |
| 175 bytes[dartx.set](i + 2, UTF8_LEADING[dartx.get](2)); | 175 bytes[dartx.set](i + 2, UTF8_LEADING[dartx.get](2)); |
| 176 bytes[dartx.set](i + 3, UTF8_LEADING[dartx.get](0)); | 176 bytes[dartx.set](i + 3, UTF8_LEADING[dartx.get](0)); |
| 177 bytes[dartx.set](i + 4, UTF8_LEADING[dartx.get](1)); | 177 bytes[dartx.set](i + 4, UTF8_LEADING[dartx.get](1)); |
| 178 bytes[dartx.set](i + 5, UTF8_LEADING[dartx.get](2)); | 178 bytes[dartx.set](i + 5, UTF8_LEADING[dartx.get](2)); |
| 179 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 179 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 180 codeUnits[dartx.set](i, TRAILING_SURROGATE); | 180 codeUnits[dartx.set](i, TRAILING_SURROGATE); |
| 181 codeUnits[dartx.set](i + 1, LEADING_SURROGATE); | 181 codeUnits[dartx.set](i + 1, LEADING_SURROGATE); |
| 182 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 182 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 183 bytes = core.List.filled(i + 6, CHAR_A); | 183 bytes = ListOfint().filled(i + 6, CHAR_A); |
| 184 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); | 184 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); |
| 185 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); | 185 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); |
| 186 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); | 186 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); |
| 187 bytes[dartx.set](i + 3, UTF8_LEADING[dartx.get](0)); | 187 bytes[dartx.set](i + 3, UTF8_LEADING[dartx.get](0)); |
| 188 bytes[dartx.set](i + 4, UTF8_LEADING[dartx.get](1)); | 188 bytes[dartx.set](i + 4, UTF8_LEADING[dartx.get](1)); |
| 189 bytes[dartx.set](i + 5, UTF8_LEADING[dartx.get](2)); | 189 bytes[dartx.set](i + 5, UTF8_LEADING[dartx.get](2)); |
| 190 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 190 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 191 codeUnits[dartx.length] = i + 3; | 191 codeUnits[dartx.length] = i + 3; |
| 192 codeUnits[dartx.set](i, LEADING_SURROGATE); | 192 codeUnits[dartx.set](i, LEADING_SURROGATE); |
| 193 codeUnits[dartx.set](i + 1, TRAILING_SURROGATE); | 193 codeUnits[dartx.set](i + 1, TRAILING_SURROGATE); |
| 194 codeUnits[dartx.set](i + 2, CHAR_A); | 194 codeUnits[dartx.set](i + 2, CHAR_A); |
| 195 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 195 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 196 bytes = core.List.filled(i + 5, CHAR_A); | 196 bytes = ListOfint().filled(i + 5, CHAR_A); |
| 197 bytes[dartx.set](i, UTF8_ENCODING[dartx.get](0)); | 197 bytes[dartx.set](i, UTF8_ENCODING[dartx.get](0)); |
| 198 bytes[dartx.set](i + 1, UTF8_ENCODING[dartx.get](1)); | 198 bytes[dartx.set](i + 1, UTF8_ENCODING[dartx.get](1)); |
| 199 bytes[dartx.set](i + 2, UTF8_ENCODING[dartx.get](2)); | 199 bytes[dartx.set](i + 2, UTF8_ENCODING[dartx.get](2)); |
| 200 bytes[dartx.set](i + 3, UTF8_ENCODING[dartx.get](3)); | 200 bytes[dartx.set](i + 3, UTF8_ENCODING[dartx.get](3)); |
| 201 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 201 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 202 codeUnits[dartx.set](i, TRAILING_SURROGATE); | 202 codeUnits[dartx.set](i, TRAILING_SURROGATE); |
| 203 codeUnits[dartx.set](i + 1, TRAILING_SURROGATE); | 203 codeUnits[dartx.set](i + 1, TRAILING_SURROGATE); |
| 204 codeUnits[dartx.set](i + 2, CHAR_A); | 204 codeUnits[dartx.set](i + 2, CHAR_A); |
| 205 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 205 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 206 bytes = core.List.filled(i + 7, CHAR_A); | 206 bytes = ListOfint().filled(i + 7, CHAR_A); |
| 207 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); | 207 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); |
| 208 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); | 208 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); |
| 209 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); | 209 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); |
| 210 bytes[dartx.set](i + 3, UTF8_TRAILING[dartx.get](0)); | 210 bytes[dartx.set](i + 3, UTF8_TRAILING[dartx.get](0)); |
| 211 bytes[dartx.set](i + 4, UTF8_TRAILING[dartx.get](1)); | 211 bytes[dartx.set](i + 4, UTF8_TRAILING[dartx.get](1)); |
| 212 bytes[dartx.set](i + 5, UTF8_TRAILING[dartx.get](2)); | 212 bytes[dartx.set](i + 5, UTF8_TRAILING[dartx.get](2)); |
| 213 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 213 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 214 codeUnits[dartx.set](i, LEADING_SURROGATE); | 214 codeUnits[dartx.set](i, LEADING_SURROGATE); |
| 215 codeUnits[dartx.set](i + 1, LEADING_SURROGATE); | 215 codeUnits[dartx.set](i + 1, LEADING_SURROGATE); |
| 216 codeUnits[dartx.set](i + 2, CHAR_A); | 216 codeUnits[dartx.set](i + 2, CHAR_A); |
| 217 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 217 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 218 bytes = core.List.filled(i + 7, CHAR_A); | 218 bytes = ListOfint().filled(i + 7, CHAR_A); |
| 219 bytes[dartx.set](i, UTF8_LEADING[dartx.get](0)); | 219 bytes[dartx.set](i, UTF8_LEADING[dartx.get](0)); |
| 220 bytes[dartx.set](i + 1, UTF8_LEADING[dartx.get](1)); | 220 bytes[dartx.set](i + 1, UTF8_LEADING[dartx.get](1)); |
| 221 bytes[dartx.set](i + 2, UTF8_LEADING[dartx.get](2)); | 221 bytes[dartx.set](i + 2, UTF8_LEADING[dartx.get](2)); |
| 222 bytes[dartx.set](i + 3, UTF8_LEADING[dartx.get](0)); | 222 bytes[dartx.set](i + 3, UTF8_LEADING[dartx.get](0)); |
| 223 bytes[dartx.set](i + 4, UTF8_LEADING[dartx.get](1)); | 223 bytes[dartx.set](i + 4, UTF8_LEADING[dartx.get](1)); |
| 224 bytes[dartx.set](i + 5, UTF8_LEADING[dartx.get](2)); | 224 bytes[dartx.set](i + 5, UTF8_LEADING[dartx.get](2)); |
| 225 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 225 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 226 codeUnits[dartx.set](i, TRAILING_SURROGATE); | 226 codeUnits[dartx.set](i, TRAILING_SURROGATE); |
| 227 codeUnits[dartx.set](i + 1, LEADING_SURROGATE); | 227 codeUnits[dartx.set](i + 1, LEADING_SURROGATE); |
| 228 codeUnits[dartx.set](i + 2, CHAR_A); | 228 codeUnits[dartx.set](i + 2, CHAR_A); |
| 229 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); | 229 str = core.String.fromCharCodes(IterableOfint()._check(codeUnits)); |
| 230 bytes = core.List.filled(i + 7, CHAR_A); | 230 bytes = ListOfint().filled(i + 7, CHAR_A); |
| 231 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); | 231 bytes[dartx.set](i, UTF8_TRAILING[dartx.get](0)); |
| 232 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); | 232 bytes[dartx.set](i + 1, UTF8_TRAILING[dartx.get](1)); |
| 233 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); | 233 bytes[dartx.set](i + 2, UTF8_TRAILING[dartx.get](2)); |
| 234 bytes[dartx.set](i + 3, UTF8_LEADING[dartx.get](0)); | 234 bytes[dartx.set](i + 3, UTF8_LEADING[dartx.get](0)); |
| 235 bytes[dartx.set](i + 4, UTF8_LEADING[dartx.get](1)); | 235 bytes[dartx.set](i + 4, UTF8_LEADING[dartx.get](1)); |
| 236 bytes[dartx.set](i + 5, UTF8_LEADING[dartx.get](2)); | 236 bytes[dartx.set](i + 5, UTF8_LEADING[dartx.get](2)); |
| 237 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); | 237 chunked_conversion_utf88_test.runTest(JSArrayOfObject().of([bytes, str])); |
| 238 codeUnits[dartx.set](i, CHAR_A); | 238 codeUnits[dartx.set](i, CHAR_A); |
| 239 } | 239 } |
| 240 }; | 240 }; |
| 241 dart.fn(chunked_conversion_utf88_test.main, VoidTodynamic()); | 241 dart.fn(chunked_conversion_utf88_test.main, VoidTodynamic()); |
| 242 // Exports: | 242 // Exports: |
| 243 exports.chunked_conversion_utf88_test = chunked_conversion_utf88_test; | 243 exports.chunked_conversion_utf88_test = chunked_conversion_utf88_test; |
| 244 }); | 244 }); |
| OLD | NEW |