| OLD | NEW |
| 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 "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import "dart:typed_data"; | 6 import "dart:typed_data"; |
| 7 | 7 |
| 8 main() { | 8 main() { |
| 9 iter(count, [values]) => values is List | 9 iter(count, [values]) => values is List |
| 10 ? new Iterable.generate(count, (x) => values[x]) | 10 ? new Iterable.generate(count, (x) => values[x]) |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 testSubstring(""); | 189 testSubstring(""); |
| 190 testSubstring("ABCDEFGH"); | 190 testSubstring("ABCDEFGH"); |
| 191 // length > 128 | 191 // length > 128 |
| 192 testSubstring("ABCDEFGH" * 33); | 192 testSubstring("ABCDEFGH" * 33); |
| 193 testSubstring("\x00" * 357); | 193 testSubstring("\x00" * 357); |
| 194 // length > 128 and non-ASCII. | 194 // length > 128 and non-ASCII. |
| 195 testSubstring("\uFFFD\uFFFE\u{10000}\u{10ffff}c\x00" * 37); | 195 testSubstring("\uFFFD\uFFFE\u{10000}\u{10ffff}c\x00" * 37); |
| 196 |
| 197 // Large List. |
| 198 var megaList = ("abcde" * 200000).codeUnits.toList(); |
| 199 test("abcde" * 199998, megaList, 5, 999995); |
| 200 // Large Uint8List. |
| 201 test("abcde" * 199998, new Uint8List.fromList(megaList), 5, 999995); |
| 196 } | 202 } |
| OLD | NEW |