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 // Library tag to be able to run in html test framework. | 5 // Library tag to be able to run in html test framework. |
6 library byte_array_test; | 6 library byte_array_test; |
7 | 7 |
8 import 'dart:typeddata'; | 8 import 'dart:typeddata'; |
9 | 9 |
10 // This test exercises optimized [] and []= operators | 10 // This test exercises optimized [] and []= operators |
(...skipping 12 matching lines...) Expand all Loading... |
23 Expect.throws(() { return array[-1]; }, | 23 Expect.throws(() { return array[-1]; }, |
24 (e) { return e is RangeError; }); | 24 (e) { return e is RangeError; }); |
25 Expect.throws(() { array[10]; }, | 25 Expect.throws(() { array[10]; }, |
26 (e) { return e is RangeError; }); | 26 (e) { return e is RangeError; }); |
27 Expect.throws(() { array[10] = 0; }, | 27 Expect.throws(() { array[10] = 0; }, |
28 (e) { return e is RangeError; }); | 28 (e) { return e is RangeError; }); |
29 Expect.throws(() { array.add(0); }, | 29 Expect.throws(() { array.add(0); }, |
30 (e) { return e is UnsupportedError; }); | 30 (e) { return e is UnsupportedError; }); |
31 Expect.throws(() { array.addAll([0]); }, | 31 Expect.throws(() { array.addAll([0]); }, |
32 (e) { return e is UnsupportedError; }); | 32 (e) { return e is UnsupportedError; }); |
33 Expect.throws(() { array.addLast(0); }, | |
34 (e) { return e is UnsupportedError; }); | |
35 Expect.throws(() { array.clear(); }, | 33 Expect.throws(() { array.clear(); }, |
36 (e) { return e is UnsupportedError; }); | 34 (e) { return e is UnsupportedError; }); |
37 Expect.throws(() { array.insertRange(0, array.length, 0); }, | 35 Expect.throws(() { array.insertRange(0, array.length, 0); }, |
38 (e) { return e is UnsupportedError; }); | 36 (e) { return e is UnsupportedError; }); |
39 Expect.throws(() { array.length = 0; }, | 37 Expect.throws(() { array.length = 0; }, |
40 (e) { return e is UnsupportedError; }); | 38 (e) { return e is UnsupportedError; }); |
41 Expect.throws(() { array.removeLast(); }, | 39 Expect.throws(() { array.removeLast(); }, |
42 (e) { return e is UnsupportedError; }); | 40 (e) { return e is UnsupportedError; }); |
43 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 41 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
44 (e) { return e is UnsupportedError; }); | 42 (e) { return e is UnsupportedError; }); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 Expect.throws(() { return array[-1]; }, | 108 Expect.throws(() { return array[-1]; }, |
111 (e) { return e is RangeError; }); | 109 (e) { return e is RangeError; }); |
112 Expect.throws(() { array[10]; }, | 110 Expect.throws(() { array[10]; }, |
113 (e) { return e is RangeError; }); | 111 (e) { return e is RangeError; }); |
114 Expect.throws(() { array[10] = 0; }, | 112 Expect.throws(() { array[10] = 0; }, |
115 (e) { return e is RangeError; }); | 113 (e) { return e is RangeError; }); |
116 Expect.throws(() { array.add(0); }, | 114 Expect.throws(() { array.add(0); }, |
117 (e) { return e is UnsupportedError; }); | 115 (e) { return e is UnsupportedError; }); |
118 Expect.throws(() { array.addAll([0]); }, | 116 Expect.throws(() { array.addAll([0]); }, |
119 (e) { return e is UnsupportedError; }); | 117 (e) { return e is UnsupportedError; }); |
120 Expect.throws(() { array.addLast(0); }, | |
121 (e) { return e is UnsupportedError; }); | |
122 Expect.throws(() { array.clear(); }, | 118 Expect.throws(() { array.clear(); }, |
123 (e) { return e is UnsupportedError; }); | 119 (e) { return e is UnsupportedError; }); |
124 Expect.throws(() { array.insertRange(0, array.length, 0); }, | 120 Expect.throws(() { array.insertRange(0, array.length, 0); }, |
125 (e) { return e is UnsupportedError; }); | 121 (e) { return e is UnsupportedError; }); |
126 Expect.throws(() { array.length = 0; }, | 122 Expect.throws(() { array.length = 0; }, |
127 (e) { return e is UnsupportedError; }); | 123 (e) { return e is UnsupportedError; }); |
128 Expect.throws(() { array.removeLast(); }, | 124 Expect.throws(() { array.removeLast(); }, |
129 (e) { return e is UnsupportedError; }); | 125 (e) { return e is UnsupportedError; }); |
130 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 126 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
131 (e) { return e is UnsupportedError; }); | 127 (e) { return e is UnsupportedError; }); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 Expect.throws(() { return array[-1]; }, | 182 Expect.throws(() { return array[-1]; }, |
187 (e) { return e is RangeError; }); | 183 (e) { return e is RangeError; }); |
188 Expect.throws(() { array[10]; }, | 184 Expect.throws(() { array[10]; }, |
189 (e) { return e is RangeError; }); | 185 (e) { return e is RangeError; }); |
190 Expect.throws(() { array[10] = 0; }, | 186 Expect.throws(() { array[10] = 0; }, |
191 (e) { return e is RangeError; }); | 187 (e) { return e is RangeError; }); |
192 Expect.throws(() { array.add(0); }, | 188 Expect.throws(() { array.add(0); }, |
193 (e) { return e is UnsupportedError; }); | 189 (e) { return e is UnsupportedError; }); |
194 Expect.throws(() { array.addAll([0]); }, | 190 Expect.throws(() { array.addAll([0]); }, |
195 (e) { return e is UnsupportedError; }); | 191 (e) { return e is UnsupportedError; }); |
196 Expect.throws(() { array.addLast(0); }, | |
197 (e) { return e is UnsupportedError; }); | |
198 Expect.throws(() { array.clear(); }, | 192 Expect.throws(() { array.clear(); }, |
199 (e) { return e is UnsupportedError; }); | 193 (e) { return e is UnsupportedError; }); |
200 Expect.throws(() { array.insertRange(0, array.length, 0); }, | 194 Expect.throws(() { array.insertRange(0, array.length, 0); }, |
201 (e) { return e is UnsupportedError; }); | 195 (e) { return e is UnsupportedError; }); |
202 Expect.throws(() { array.length = 0; }, | 196 Expect.throws(() { array.length = 0; }, |
203 (e) { return e is UnsupportedError; }); | 197 (e) { return e is UnsupportedError; }); |
204 Expect.throws(() { array.removeLast(); }, | 198 Expect.throws(() { array.removeLast(); }, |
205 (e) { return e is UnsupportedError; }); | 199 (e) { return e is UnsupportedError; }); |
206 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 200 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
207 (e) { return e is UnsupportedError; }); | 201 (e) { return e is UnsupportedError; }); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 Expect.throws(() { return array[-1]; }, | 268 Expect.throws(() { return array[-1]; }, |
275 (e) { return e is RangeError; }); | 269 (e) { return e is RangeError; }); |
276 Expect.throws(() { array[10]; }, | 270 Expect.throws(() { array[10]; }, |
277 (e) { return e is RangeError; }); | 271 (e) { return e is RangeError; }); |
278 Expect.throws(() { array[10] = 0; }, | 272 Expect.throws(() { array[10] = 0; }, |
279 (e) { return e is RangeError; }); | 273 (e) { return e is RangeError; }); |
280 Expect.throws(() { array.add(0); }, | 274 Expect.throws(() { array.add(0); }, |
281 (e) { return e is UnsupportedError; }); | 275 (e) { return e is UnsupportedError; }); |
282 Expect.throws(() { array.addAll([0]); }, | 276 Expect.throws(() { array.addAll([0]); }, |
283 (e) { return e is UnsupportedError; }); | 277 (e) { return e is UnsupportedError; }); |
284 Expect.throws(() { array.addLast(0); }, | |
285 (e) { return e is UnsupportedError; }); | |
286 Expect.throws(() { array.clear(); }, | 278 Expect.throws(() { array.clear(); }, |
287 (e) { return e is UnsupportedError; }); | 279 (e) { return e is UnsupportedError; }); |
288 Expect.throws(() { array.insertRange(0, array.length, 0); }, | 280 Expect.throws(() { array.insertRange(0, array.length, 0); }, |
289 (e) { return e is UnsupportedError; }); | 281 (e) { return e is UnsupportedError; }); |
290 Expect.throws(() { array.length = 0; }, | 282 Expect.throws(() { array.length = 0; }, |
291 (e) { return e is UnsupportedError; }); | 283 (e) { return e is UnsupportedError; }); |
292 Expect.throws(() { array.removeLast(); }, | 284 Expect.throws(() { array.removeLast(); }, |
293 (e) { return e is UnsupportedError; }); | 285 (e) { return e is UnsupportedError; }); |
294 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 286 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
295 (e) { return e is UnsupportedError; }); | 287 (e) { return e is UnsupportedError; }); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 Expect.throws(() { return array[-1]; }, | 342 Expect.throws(() { return array[-1]; }, |
351 (e) { return e is RangeError; }); | 343 (e) { return e is RangeError; }); |
352 Expect.throws(() { array[10]; }, | 344 Expect.throws(() { array[10]; }, |
353 (e) { return e is RangeError; }); | 345 (e) { return e is RangeError; }); |
354 Expect.throws(() { array[10] = 0; }, | 346 Expect.throws(() { array[10] = 0; }, |
355 (e) { return e is RangeError; }); | 347 (e) { return e is RangeError; }); |
356 Expect.throws(() { array.add(0); }, | 348 Expect.throws(() { array.add(0); }, |
357 (e) { return e is UnsupportedError; }); | 349 (e) { return e is UnsupportedError; }); |
358 Expect.throws(() { array.addAll([0]); }, | 350 Expect.throws(() { array.addAll([0]); }, |
359 (e) { return e is UnsupportedError; }); | 351 (e) { return e is UnsupportedError; }); |
360 Expect.throws(() { array.addLast(0); }, | |
361 (e) { return e is UnsupportedError; }); | |
362 Expect.throws(() { array.clear(); }, | 352 Expect.throws(() { array.clear(); }, |
363 (e) { return e is UnsupportedError; }); | 353 (e) { return e is UnsupportedError; }); |
364 Expect.throws(() { array.insertRange(0, array.length, 0); }, | 354 Expect.throws(() { array.insertRange(0, array.length, 0); }, |
365 (e) { return e is UnsupportedError; }); | 355 (e) { return e is UnsupportedError; }); |
366 Expect.throws(() { array.length = 0; }, | 356 Expect.throws(() { array.length = 0; }, |
367 (e) { return e is UnsupportedError; }); | 357 (e) { return e is UnsupportedError; }); |
368 Expect.throws(() { array.removeLast(); }, | 358 Expect.throws(() { array.removeLast(); }, |
369 (e) { return e is UnsupportedError; }); | 359 (e) { return e is UnsupportedError; }); |
370 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 360 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
371 (e) { return e is UnsupportedError; }); | 361 (e) { return e is UnsupportedError; }); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 Expect.throws(() { return array[-1]; }, | 434 Expect.throws(() { return array[-1]; }, |
445 (e) { return e is RangeError; }); | 435 (e) { return e is RangeError; }); |
446 Expect.throws(() { array[10]; }, | 436 Expect.throws(() { array[10]; }, |
447 (e) { return e is RangeError; }); | 437 (e) { return e is RangeError; }); |
448 Expect.throws(() { array[10] = 0; }, | 438 Expect.throws(() { array[10] = 0; }, |
449 (e) { return e is RangeError; }); | 439 (e) { return e is RangeError; }); |
450 Expect.throws(() { array.add(0); }, | 440 Expect.throws(() { array.add(0); }, |
451 (e) { return e is UnsupportedError; }); | 441 (e) { return e is UnsupportedError; }); |
452 Expect.throws(() { array.addAll([0]); }, | 442 Expect.throws(() { array.addAll([0]); }, |
453 (e) { return e is UnsupportedError; }); | 443 (e) { return e is UnsupportedError; }); |
454 Expect.throws(() { array.addLast(0); }, | |
455 (e) { return e is UnsupportedError; }); | |
456 Expect.throws(() { array.clear(); }, | 444 Expect.throws(() { array.clear(); }, |
457 (e) { return e is UnsupportedError; }); | 445 (e) { return e is UnsupportedError; }); |
458 Expect.throws(() { array.insertRange(0, array.length, 0); }, | 446 Expect.throws(() { array.insertRange(0, array.length, 0); }, |
459 (e) { return e is UnsupportedError; }); | 447 (e) { return e is UnsupportedError; }); |
460 Expect.throws(() { array.length = 0; }, | 448 Expect.throws(() { array.length = 0; }, |
461 (e) { return e is UnsupportedError; }); | 449 (e) { return e is UnsupportedError; }); |
462 Expect.throws(() { array.removeLast(); }, | 450 Expect.throws(() { array.removeLast(); }, |
463 (e) { return e is UnsupportedError; }); | 451 (e) { return e is UnsupportedError; }); |
464 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 452 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
465 (e) { return e is UnsupportedError; }); | 453 (e) { return e is UnsupportedError; }); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 Expect.throws(() { return array[-1]; }, | 514 Expect.throws(() { return array[-1]; }, |
527 (e) { return e is RangeError; }); | 515 (e) { return e is RangeError; }); |
528 Expect.throws(() { array[10]; }, | 516 Expect.throws(() { array[10]; }, |
529 (e) { return e is RangeError; }); | 517 (e) { return e is RangeError; }); |
530 Expect.throws(() { array[10] = 0; }, | 518 Expect.throws(() { array[10] = 0; }, |
531 (e) { return e is RangeError; }); | 519 (e) { return e is RangeError; }); |
532 Expect.throws(() { array.add(0); }, | 520 Expect.throws(() { array.add(0); }, |
533 (e) { return e is UnsupportedError; }); | 521 (e) { return e is UnsupportedError; }); |
534 Expect.throws(() { array.addAll([0]); }, | 522 Expect.throws(() { array.addAll([0]); }, |
535 (e) { return e is UnsupportedError; }); | 523 (e) { return e is UnsupportedError; }); |
536 Expect.throws(() { array.addLast(0); }, | |
537 (e) { return e is UnsupportedError; }); | |
538 Expect.throws(() { array.clear(); }, | 524 Expect.throws(() { array.clear(); }, |
539 (e) { return e is UnsupportedError; }); | 525 (e) { return e is UnsupportedError; }); |
540 Expect.throws(() { array.insertRange(0, array.length, 0); }, | 526 Expect.throws(() { array.insertRange(0, array.length, 0); }, |
541 (e) { return e is UnsupportedError; }); | 527 (e) { return e is UnsupportedError; }); |
542 Expect.throws(() { array.length = 0; }, | 528 Expect.throws(() { array.length = 0; }, |
543 (e) { return e is UnsupportedError; }); | 529 (e) { return e is UnsupportedError; }); |
544 Expect.throws(() { array.removeLast(); }, | 530 Expect.throws(() { array.removeLast(); }, |
545 (e) { return e is UnsupportedError; }); | 531 (e) { return e is UnsupportedError; }); |
546 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 532 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
547 (e) { return e is UnsupportedError; }); | 533 (e) { return e is UnsupportedError; }); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 Expect.throws(() { return array[-1]; }, | 607 Expect.throws(() { return array[-1]; }, |
622 (e) { return e is RangeError; }); | 608 (e) { return e is RangeError; }); |
623 Expect.throws(() { array[10]; }, | 609 Expect.throws(() { array[10]; }, |
624 (e) { return e is RangeError; }); | 610 (e) { return e is RangeError; }); |
625 Expect.throws(() { array[10] = 0; }, | 611 Expect.throws(() { array[10] = 0; }, |
626 (e) { return e is RangeError; }); | 612 (e) { return e is RangeError; }); |
627 Expect.throws(() { array.add(0); }, | 613 Expect.throws(() { array.add(0); }, |
628 (e) { return e is UnsupportedError; }); | 614 (e) { return e is UnsupportedError; }); |
629 Expect.throws(() { array.addAll([0]); }, | 615 Expect.throws(() { array.addAll([0]); }, |
630 (e) { return e is UnsupportedError; }); | 616 (e) { return e is UnsupportedError; }); |
631 Expect.throws(() { array.addLast(0); }, | |
632 (e) { return e is UnsupportedError; }); | |
633 Expect.throws(() { array.clear(); }, | 617 Expect.throws(() { array.clear(); }, |
634 (e) { return e is UnsupportedError; }); | 618 (e) { return e is UnsupportedError; }); |
635 Expect.throws(() { array.insertRange(0, array.length, 0); }, | 619 Expect.throws(() { array.insertRange(0, array.length, 0); }, |
636 (e) { return e is UnsupportedError; }); | 620 (e) { return e is UnsupportedError; }); |
637 Expect.throws(() { array.length = 0; }, | 621 Expect.throws(() { array.length = 0; }, |
638 (e) { return e is UnsupportedError; }); | 622 (e) { return e is UnsupportedError; }); |
639 Expect.throws(() { array.removeLast(); }, | 623 Expect.throws(() { array.removeLast(); }, |
640 (e) { return e is UnsupportedError; }); | 624 (e) { return e is UnsupportedError; }); |
641 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 625 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
642 (e) { return e is UnsupportedError; }); | 626 (e) { return e is UnsupportedError; }); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 Expect.throws(() { return array[-1]; }, | 684 Expect.throws(() { return array[-1]; }, |
701 (e) { return e is RangeError; }); | 685 (e) { return e is RangeError; }); |
702 Expect.throws(() { array[10]; }, | 686 Expect.throws(() { array[10]; }, |
703 (e) { return e is RangeError; }); | 687 (e) { return e is RangeError; }); |
704 Expect.throws(() { array[10] = 0.0; }, | 688 Expect.throws(() { array[10] = 0.0; }, |
705 (e) { return e is RangeError; }); | 689 (e) { return e is RangeError; }); |
706 Expect.throws(() { array.add(0.0); }, | 690 Expect.throws(() { array.add(0.0); }, |
707 (e) { return e is UnsupportedError; }); | 691 (e) { return e is UnsupportedError; }); |
708 Expect.throws(() { array.addAll([0]); }, | 692 Expect.throws(() { array.addAll([0]); }, |
709 (e) { return e is UnsupportedError; }); | 693 (e) { return e is UnsupportedError; }); |
710 Expect.throws(() { array.addLast(0.0); }, | |
711 (e) { return e is UnsupportedError; }); | |
712 Expect.throws(() { array.clear(); }, | 694 Expect.throws(() { array.clear(); }, |
713 (e) { return e is UnsupportedError; }); | 695 (e) { return e is UnsupportedError; }); |
714 Expect.throws(() { array.insertRange(0, array.length, 0.0); }, | 696 Expect.throws(() { array.insertRange(0, array.length, 0.0); }, |
715 (e) { return e is UnsupportedError; }); | 697 (e) { return e is UnsupportedError; }); |
716 Expect.throws(() { array.length = 0; }, | 698 Expect.throws(() { array.length = 0; }, |
717 (e) { return e is UnsupportedError; }); | 699 (e) { return e is UnsupportedError; }); |
718 Expect.throws(() { array.removeLast(); }, | 700 Expect.throws(() { array.removeLast(); }, |
719 (e) { return e is UnsupportedError; }); | 701 (e) { return e is UnsupportedError; }); |
720 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 702 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
721 (e) { return e is UnsupportedError; }); | 703 (e) { return e is UnsupportedError; }); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 Expect.throws(() { return array[-1]; }, | 748 Expect.throws(() { return array[-1]; }, |
767 (e) { return e is RangeError; }); | 749 (e) { return e is RangeError; }); |
768 Expect.throws(() { array[10]; }, | 750 Expect.throws(() { array[10]; }, |
769 (e) { return e is RangeError; }); | 751 (e) { return e is RangeError; }); |
770 Expect.throws(() { array[10] = 0.0; }, | 752 Expect.throws(() { array[10] = 0.0; }, |
771 (e) { return e is RangeError; }); | 753 (e) { return e is RangeError; }); |
772 Expect.throws(() { array.add(0.0); }, | 754 Expect.throws(() { array.add(0.0); }, |
773 (e) { return e is UnsupportedError; }); | 755 (e) { return e is UnsupportedError; }); |
774 Expect.throws(() { array.addAll([0]); }, | 756 Expect.throws(() { array.addAll([0]); }, |
775 (e) { return e is UnsupportedError; }); | 757 (e) { return e is UnsupportedError; }); |
776 Expect.throws(() { array.addLast(0.0); }, | |
777 (e) { return e is UnsupportedError; }); | |
778 Expect.throws(() { array.clear(); }, | 758 Expect.throws(() { array.clear(); }, |
779 (e) { return e is UnsupportedError; }); | 759 (e) { return e is UnsupportedError; }); |
780 Expect.throws(() { array.insertRange(0, array.length, 0.0); }, | 760 Expect.throws(() { array.insertRange(0, array.length, 0.0); }, |
781 (e) { return e is UnsupportedError; }); | 761 (e) { return e is UnsupportedError; }); |
782 Expect.throws(() { array.length = 0; }, | 762 Expect.throws(() { array.length = 0; }, |
783 (e) { return e is UnsupportedError; }); | 763 (e) { return e is UnsupportedError; }); |
784 Expect.throws(() { array.removeLast(); }, | 764 Expect.throws(() { array.removeLast(); }, |
785 (e) { return e is UnsupportedError; }); | 765 (e) { return e is UnsupportedError; }); |
786 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 766 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
787 (e) { return e is UnsupportedError; }); | 767 (e) { return e is UnsupportedError; }); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 Expect.throws(() { return view[-1]; }, | 842 Expect.throws(() { return view[-1]; }, |
863 (e) { return e is RangeError; }); | 843 (e) { return e is RangeError; }); |
864 Expect.throws(() { view[view.length]; }, | 844 Expect.throws(() { view[view.length]; }, |
865 (e) { return e is RangeError; }); | 845 (e) { return e is RangeError; }); |
866 Expect.throws(() { view[10] = 0; }, | 846 Expect.throws(() { view[10] = 0; }, |
867 (e) { return e is RangeError; }); | 847 (e) { return e is RangeError; }); |
868 Expect.throws(() { view.add(0); }, | 848 Expect.throws(() { view.add(0); }, |
869 (e) { return e is UnsupportedError; }); | 849 (e) { return e is UnsupportedError; }); |
870 Expect.throws(() { view.addAll([0]); }, | 850 Expect.throws(() { view.addAll([0]); }, |
871 (e) { return e is UnsupportedError; }); | 851 (e) { return e is UnsupportedError; }); |
872 Expect.throws(() { view.addLast(0); }, | |
873 (e) { return e is UnsupportedError; }); | |
874 Expect.throws(() { view.clear(); }, | 852 Expect.throws(() { view.clear(); }, |
875 (e) { return e is UnsupportedError; }); | 853 (e) { return e is UnsupportedError; }); |
876 Expect.throws(() { view.insertRange(0, view.length, 0); }, | 854 Expect.throws(() { view.insertRange(0, view.length, 0); }, |
877 (e) { return e is UnsupportedError; }); | 855 (e) { return e is UnsupportedError; }); |
878 Expect.throws(() { view.length = 0; }, | 856 Expect.throws(() { view.length = 0; }, |
879 (e) { return e is UnsupportedError; }); | 857 (e) { return e is UnsupportedError; }); |
880 Expect.throws(() { view.removeLast(); }, | 858 Expect.throws(() { view.removeLast(); }, |
881 (e) { return e is UnsupportedError; }); | 859 (e) { return e is UnsupportedError; }); |
882 Expect.throws(() { view.removeRange(0, view.length - 1); }, | 860 Expect.throws(() { view.removeRange(0, view.length - 1); }, |
883 (e) { return e is UnsupportedError; }); | 861 (e) { return e is UnsupportedError; }); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 Expect.throws(() { return view[-1]; }, | 971 Expect.throws(() { return view[-1]; }, |
994 (e) { return e is RangeError; }); | 972 (e) { return e is RangeError; }); |
995 Expect.throws(() { view[view.length]; }, | 973 Expect.throws(() { view[view.length]; }, |
996 (e) { return e is RangeError; }); | 974 (e) { return e is RangeError; }); |
997 Expect.throws(() { view[view.length] = 0; }, | 975 Expect.throws(() { view[view.length] = 0; }, |
998 (e) { return e is RangeError; }); | 976 (e) { return e is RangeError; }); |
999 Expect.throws(() { view.add(0); }, | 977 Expect.throws(() { view.add(0); }, |
1000 (e) { return e is UnsupportedError; }); | 978 (e) { return e is UnsupportedError; }); |
1001 Expect.throws(() { view.addAll([0]); }, | 979 Expect.throws(() { view.addAll([0]); }, |
1002 (e) { return e is UnsupportedError; }); | 980 (e) { return e is UnsupportedError; }); |
1003 Expect.throws(() { view.addLast(0); }, | |
1004 (e) { return e is UnsupportedError; }); | |
1005 Expect.throws(() { view.clear(); }, | 981 Expect.throws(() { view.clear(); }, |
1006 (e) { return e is UnsupportedError; }); | 982 (e) { return e is UnsupportedError; }); |
1007 Expect.throws(() { view.insertRange(0, view.length, 0); }, | 983 Expect.throws(() { view.insertRange(0, view.length, 0); }, |
1008 (e) { return e is UnsupportedError; }); | 984 (e) { return e is UnsupportedError; }); |
1009 Expect.throws(() { view.length = 0; }, | 985 Expect.throws(() { view.length = 0; }, |
1010 (e) { return e is UnsupportedError; }); | 986 (e) { return e is UnsupportedError; }); |
1011 Expect.throws(() { view.removeLast(); }, | 987 Expect.throws(() { view.removeLast(); }, |
1012 (e) { return e is UnsupportedError; }); | 988 (e) { return e is UnsupportedError; }); |
1013 Expect.throws(() { view.removeRange(0, view.length - 1); }, | 989 Expect.throws(() { view.removeRange(0, view.length - 1); }, |
1014 (e) { return e is UnsupportedError; }); | 990 (e) { return e is UnsupportedError; }); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 Expect.throws(() { return view[-1]; }, | 1080 Expect.throws(() { return view[-1]; }, |
1105 (e) { return e is RangeError; }); | 1081 (e) { return e is RangeError; }); |
1106 Expect.throws(() { view[view.length]; }, | 1082 Expect.throws(() { view[view.length]; }, |
1107 (e) { return e is RangeError; }); | 1083 (e) { return e is RangeError; }); |
1108 Expect.throws(() { view[10] = 0; }, | 1084 Expect.throws(() { view[10] = 0; }, |
1109 (e) { return e is RangeError; }); | 1085 (e) { return e is RangeError; }); |
1110 Expect.throws(() { view.add(0); }, | 1086 Expect.throws(() { view.add(0); }, |
1111 (e) { return e is UnsupportedError; }); | 1087 (e) { return e is UnsupportedError; }); |
1112 Expect.throws(() { view.addAll([0]); }, | 1088 Expect.throws(() { view.addAll([0]); }, |
1113 (e) { return e is UnsupportedError; }); | 1089 (e) { return e is UnsupportedError; }); |
1114 Expect.throws(() { view.addLast(0); }, | |
1115 (e) { return e is UnsupportedError; }); | |
1116 Expect.throws(() { view.clear(); }, | 1090 Expect.throws(() { view.clear(); }, |
1117 (e) { return e is UnsupportedError; }); | 1091 (e) { return e is UnsupportedError; }); |
1118 Expect.throws(() { view.insertRange(0, view.length, 0); }, | 1092 Expect.throws(() { view.insertRange(0, view.length, 0); }, |
1119 (e) { return e is UnsupportedError; }); | 1093 (e) { return e is UnsupportedError; }); |
1120 Expect.throws(() { view.length = 0; }, | 1094 Expect.throws(() { view.length = 0; }, |
1121 (e) { return e is UnsupportedError; }); | 1095 (e) { return e is UnsupportedError; }); |
1122 Expect.throws(() { view.removeLast(); }, | 1096 Expect.throws(() { view.removeLast(); }, |
1123 (e) { return e is UnsupportedError; }); | 1097 (e) { return e is UnsupportedError; }); |
1124 Expect.throws(() { view.removeRange(0, view.length - 1); }, | 1098 Expect.throws(() { view.removeRange(0, view.length - 1); }, |
1125 (e) { return e is UnsupportedError; }); | 1099 (e) { return e is UnsupportedError; }); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 Expect.throws(() { return view[-1]; }, | 1217 Expect.throws(() { return view[-1]; }, |
1244 (e) { return e is RangeError; }); | 1218 (e) { return e is RangeError; }); |
1245 Expect.throws(() { view[view.length]; }, | 1219 Expect.throws(() { view[view.length]; }, |
1246 (e) { return e is RangeError; }); | 1220 (e) { return e is RangeError; }); |
1247 Expect.throws(() { view[view.length] = 0; }, | 1221 Expect.throws(() { view[view.length] = 0; }, |
1248 (e) { return e is RangeError; }); | 1222 (e) { return e is RangeError; }); |
1249 Expect.throws(() { view.add(0); }, | 1223 Expect.throws(() { view.add(0); }, |
1250 (e) { return e is UnsupportedError; }); | 1224 (e) { return e is UnsupportedError; }); |
1251 Expect.throws(() { view.addAll([0]); }, | 1225 Expect.throws(() { view.addAll([0]); }, |
1252 (e) { return e is UnsupportedError; }); | 1226 (e) { return e is UnsupportedError; }); |
1253 Expect.throws(() { view.addLast(0); }, | |
1254 (e) { return e is UnsupportedError; }); | |
1255 Expect.throws(() { view.clear(); }, | 1227 Expect.throws(() { view.clear(); }, |
1256 (e) { return e is UnsupportedError; }); | 1228 (e) { return e is UnsupportedError; }); |
1257 Expect.throws(() { view.insertRange(0, view.length, 0); }, | 1229 Expect.throws(() { view.insertRange(0, view.length, 0); }, |
1258 (e) { return e is UnsupportedError; }); | 1230 (e) { return e is UnsupportedError; }); |
1259 Expect.throws(() { view.length = 0; }, | 1231 Expect.throws(() { view.length = 0; }, |
1260 (e) { return e is UnsupportedError; }); | 1232 (e) { return e is UnsupportedError; }); |
1261 Expect.throws(() { view.removeLast(); }, | 1233 Expect.throws(() { view.removeLast(); }, |
1262 (e) { return e is UnsupportedError; }); | 1234 (e) { return e is UnsupportedError; }); |
1263 Expect.throws(() { view.removeRange(0, view.length - 1); }, | 1235 Expect.throws(() { view.removeRange(0, view.length - 1); }, |
1264 (e) { return e is UnsupportedError; }); | 1236 (e) { return e is UnsupportedError; }); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 Expect.throws(() { return view[-1]; }, | 1332 Expect.throws(() { return view[-1]; }, |
1361 (e) { return e is RangeError; }); | 1333 (e) { return e is RangeError; }); |
1362 Expect.throws(() { view[view.length]; }, | 1334 Expect.throws(() { view[view.length]; }, |
1363 (e) { return e is RangeError; }); | 1335 (e) { return e is RangeError; }); |
1364 Expect.throws(() { view[10] = 0; }, | 1336 Expect.throws(() { view[10] = 0; }, |
1365 (e) { return e is RangeError; }); | 1337 (e) { return e is RangeError; }); |
1366 Expect.throws(() { view.add(0); }, | 1338 Expect.throws(() { view.add(0); }, |
1367 (e) { return e is UnsupportedError; }); | 1339 (e) { return e is UnsupportedError; }); |
1368 Expect.throws(() { view.addAll([0]); }, | 1340 Expect.throws(() { view.addAll([0]); }, |
1369 (e) { return e is UnsupportedError; }); | 1341 (e) { return e is UnsupportedError; }); |
1370 Expect.throws(() { view.addLast(0); }, | |
1371 (e) { return e is UnsupportedError; }); | |
1372 Expect.throws(() { view.clear(); }, | 1342 Expect.throws(() { view.clear(); }, |
1373 (e) { return e is UnsupportedError; }); | 1343 (e) { return e is UnsupportedError; }); |
1374 Expect.throws(() { view.insertRange(0, view.length, 0); }, | 1344 Expect.throws(() { view.insertRange(0, view.length, 0); }, |
1375 (e) { return e is UnsupportedError; }); | 1345 (e) { return e is UnsupportedError; }); |
1376 Expect.throws(() { view.length = 0; }, | 1346 Expect.throws(() { view.length = 0; }, |
1377 (e) { return e is UnsupportedError; }); | 1347 (e) { return e is UnsupportedError; }); |
1378 Expect.throws(() { view.removeLast(); }, | 1348 Expect.throws(() { view.removeLast(); }, |
1379 (e) { return e is UnsupportedError; }); | 1349 (e) { return e is UnsupportedError; }); |
1380 Expect.throws(() { view.removeRange(0, view.length - 1); }, | 1350 Expect.throws(() { view.removeRange(0, view.length - 1); }, |
1381 (e) { return e is UnsupportedError; }); | 1351 (e) { return e is UnsupportedError; }); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 Expect.throws(() { return view[-1]; }, | 1488 Expect.throws(() { return view[-1]; }, |
1519 (e) { return e is RangeError; }); | 1489 (e) { return e is RangeError; }); |
1520 Expect.throws(() { view[view.length]; }, | 1490 Expect.throws(() { view[view.length]; }, |
1521 (e) { return e is RangeError; }); | 1491 (e) { return e is RangeError; }); |
1522 Expect.throws(() { view[view.length] = 0; }, | 1492 Expect.throws(() { view[view.length] = 0; }, |
1523 (e) { return e is RangeError; }); | 1493 (e) { return e is RangeError; }); |
1524 Expect.throws(() { view.add(0); }, | 1494 Expect.throws(() { view.add(0); }, |
1525 (e) { return e is UnsupportedError; }); | 1495 (e) { return e is UnsupportedError; }); |
1526 Expect.throws(() { view.addAll([0]); }, | 1496 Expect.throws(() { view.addAll([0]); }, |
1527 (e) { return e is UnsupportedError; }); | 1497 (e) { return e is UnsupportedError; }); |
1528 Expect.throws(() { view.addLast(0); }, | |
1529 (e) { return e is UnsupportedError; }); | |
1530 Expect.throws(() { view.clear(); }, | 1498 Expect.throws(() { view.clear(); }, |
1531 (e) { return e is UnsupportedError; }); | 1499 (e) { return e is UnsupportedError; }); |
1532 Expect.throws(() { view.insertRange(0, view.length, 0); }, | 1500 Expect.throws(() { view.insertRange(0, view.length, 0); }, |
1533 (e) { return e is UnsupportedError; }); | 1501 (e) { return e is UnsupportedError; }); |
1534 Expect.throws(() { view.length = 0; }, | 1502 Expect.throws(() { view.length = 0; }, |
1535 (e) { return e is UnsupportedError; }); | 1503 (e) { return e is UnsupportedError; }); |
1536 Expect.throws(() { view.removeLast(); }, | 1504 Expect.throws(() { view.removeLast(); }, |
1537 (e) { return e is UnsupportedError; }); | 1505 (e) { return e is UnsupportedError; }); |
1538 Expect.throws(() { view.removeRange(0, view.length - 1); }, | 1506 Expect.throws(() { view.removeRange(0, view.length - 1); }, |
1539 (e) { return e is UnsupportedError; }); | 1507 (e) { return e is UnsupportedError; }); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 Expect.throws(() { return view[-1]; }, | 1619 Expect.throws(() { return view[-1]; }, |
1652 (e) { return e is RangeError; }); | 1620 (e) { return e is RangeError; }); |
1653 Expect.throws(() { view[view.length]; }, | 1621 Expect.throws(() { view[view.length]; }, |
1654 (e) { return e is RangeError; }); | 1622 (e) { return e is RangeError; }); |
1655 Expect.throws(() { view[10] = 0; }, | 1623 Expect.throws(() { view[10] = 0; }, |
1656 (e) { return e is RangeError; }); | 1624 (e) { return e is RangeError; }); |
1657 Expect.throws(() { view.add(0); }, | 1625 Expect.throws(() { view.add(0); }, |
1658 (e) { return e is UnsupportedError; }); | 1626 (e) { return e is UnsupportedError; }); |
1659 Expect.throws(() { view.addAll([0]); }, | 1627 Expect.throws(() { view.addAll([0]); }, |
1660 (e) { return e is UnsupportedError; }); | 1628 (e) { return e is UnsupportedError; }); |
1661 Expect.throws(() { view.addLast(0); }, | |
1662 (e) { return e is UnsupportedError; }); | |
1663 Expect.throws(() { view.clear(); }, | 1629 Expect.throws(() { view.clear(); }, |
1664 (e) { return e is UnsupportedError; }); | 1630 (e) { return e is UnsupportedError; }); |
1665 Expect.throws(() { view.insertRange(0, view.length, 0); }, | 1631 Expect.throws(() { view.insertRange(0, view.length, 0); }, |
1666 (e) { return e is UnsupportedError; }); | 1632 (e) { return e is UnsupportedError; }); |
1667 Expect.throws(() { view.length = 0; }, | 1633 Expect.throws(() { view.length = 0; }, |
1668 (e) { return e is UnsupportedError; }); | 1634 (e) { return e is UnsupportedError; }); |
1669 Expect.throws(() { view.removeLast(); }, | 1635 Expect.throws(() { view.removeLast(); }, |
1670 (e) { return e is UnsupportedError; }); | 1636 (e) { return e is UnsupportedError; }); |
1671 Expect.throws(() { view.removeRange(0, view.length - 1); }, | 1637 Expect.throws(() { view.removeRange(0, view.length - 1); }, |
1672 (e) { return e is UnsupportedError; }); | 1638 (e) { return e is UnsupportedError; }); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1854 Expect.throws(() { return view[-1]; }, | 1820 Expect.throws(() { return view[-1]; }, |
1855 (e) { return e is RangeError; }); | 1821 (e) { return e is RangeError; }); |
1856 Expect.throws(() { view[view.length]; }, | 1822 Expect.throws(() { view[view.length]; }, |
1857 (e) { return e is RangeError; }); | 1823 (e) { return e is RangeError; }); |
1858 Expect.throws(() { view[view.length] = 0; }, | 1824 Expect.throws(() { view[view.length] = 0; }, |
1859 (e) { return e is RangeError; }); | 1825 (e) { return e is RangeError; }); |
1860 Expect.throws(() { view.add(0); }, | 1826 Expect.throws(() { view.add(0); }, |
1861 (e) { return e is UnsupportedError; }); | 1827 (e) { return e is UnsupportedError; }); |
1862 Expect.throws(() { view.addAll([0]); }, | 1828 Expect.throws(() { view.addAll([0]); }, |
1863 (e) { return e is UnsupportedError; }); | 1829 (e) { return e is UnsupportedError; }); |
1864 Expect.throws(() { view.addLast(0); }, | |
1865 (e) { return e is UnsupportedError; }); | |
1866 Expect.throws(() { view.clear(); }, | 1830 Expect.throws(() { view.clear(); }, |
1867 (e) { return e is UnsupportedError; }); | 1831 (e) { return e is UnsupportedError; }); |
1868 Expect.throws(() { view.insertRange(0, view.length, 0); }, | 1832 Expect.throws(() { view.insertRange(0, view.length, 0); }, |
1869 (e) { return e is UnsupportedError; }); | 1833 (e) { return e is UnsupportedError; }); |
1870 Expect.throws(() { view.length = 0; }, | 1834 Expect.throws(() { view.length = 0; }, |
1871 (e) { return e is UnsupportedError; }); | 1835 (e) { return e is UnsupportedError; }); |
1872 Expect.throws(() { view.removeLast(); }, | 1836 Expect.throws(() { view.removeLast(); }, |
1873 (e) { return e is UnsupportedError; }); | 1837 (e) { return e is UnsupportedError; }); |
1874 Expect.throws(() { view.removeRange(0, view.length - 1); }, | 1838 Expect.throws(() { view.removeRange(0, view.length - 1); }, |
1875 (e) { return e is UnsupportedError; }); | 1839 (e) { return e is UnsupportedError; }); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2012 Expect.throws(() { return view[-1]; }, | 1976 Expect.throws(() { return view[-1]; }, |
2013 (e) { return e is RangeError; }); | 1977 (e) { return e is RangeError; }); |
2014 Expect.throws(() { view[10]; }, | 1978 Expect.throws(() { view[10]; }, |
2015 (e) { return e is RangeError; }); | 1979 (e) { return e is RangeError; }); |
2016 Expect.throws(() { view[10] = 0.0; }, | 1980 Expect.throws(() { view[10] = 0.0; }, |
2017 (e) { return e is RangeError; }); | 1981 (e) { return e is RangeError; }); |
2018 Expect.throws(() { array.add(0.0); }, | 1982 Expect.throws(() { array.add(0.0); }, |
2019 (e) { return e is UnsupportedError; }); | 1983 (e) { return e is UnsupportedError; }); |
2020 Expect.throws(() { array.addAll([0]); }, | 1984 Expect.throws(() { array.addAll([0]); }, |
2021 (e) { return e is UnsupportedError; }); | 1985 (e) { return e is UnsupportedError; }); |
2022 Expect.throws(() { array.addLast(0.0); }, | |
2023 (e) { return e is UnsupportedError; }); | |
2024 Expect.throws(() { array.clear(); }, | 1986 Expect.throws(() { array.clear(); }, |
2025 (e) { return e is UnsupportedError; }); | 1987 (e) { return e is UnsupportedError; }); |
2026 Expect.throws(() { array.insertRange(0, array.length, 0.0); }, | 1988 Expect.throws(() { array.insertRange(0, array.length, 0.0); }, |
2027 (e) { return e is UnsupportedError; }); | 1989 (e) { return e is UnsupportedError; }); |
2028 Expect.throws(() { array.length = 0; }, | 1990 Expect.throws(() { array.length = 0; }, |
2029 (e) { return e is UnsupportedError; }); | 1991 (e) { return e is UnsupportedError; }); |
2030 Expect.throws(() { array.removeLast(); }, | 1992 Expect.throws(() { array.removeLast(); }, |
2031 (e) { return e is UnsupportedError; }); | 1993 (e) { return e is UnsupportedError; }); |
2032 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 1994 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
2033 (e) { return e is UnsupportedError; }); | 1995 (e) { return e is UnsupportedError; }); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2119 Expect.throws(() { return view[-1]; }, | 2081 Expect.throws(() { return view[-1]; }, |
2120 (e) { return e is RangeError; }); | 2082 (e) { return e is RangeError; }); |
2121 Expect.throws(() { view[10]; }, | 2083 Expect.throws(() { view[10]; }, |
2122 (e) { return e is RangeError; }); | 2084 (e) { return e is RangeError; }); |
2123 Expect.throws(() { view[10] = 0.0; }, | 2085 Expect.throws(() { view[10] = 0.0; }, |
2124 (e) { return e is RangeError; }); | 2086 (e) { return e is RangeError; }); |
2125 Expect.throws(() { array.add(0.0); }, | 2087 Expect.throws(() { array.add(0.0); }, |
2126 (e) { return e is UnsupportedError; }); | 2088 (e) { return e is UnsupportedError; }); |
2127 Expect.throws(() { array.addAll([0]); }, | 2089 Expect.throws(() { array.addAll([0]); }, |
2128 (e) { return e is UnsupportedError; }); | 2090 (e) { return e is UnsupportedError; }); |
2129 Expect.throws(() { array.addLast(0.0); }, | |
2130 (e) { return e is UnsupportedError; }); | |
2131 Expect.throws(() { array.clear(); }, | 2091 Expect.throws(() { array.clear(); }, |
2132 (e) { return e is UnsupportedError; }); | 2092 (e) { return e is UnsupportedError; }); |
2133 Expect.throws(() { array.insertRange(0, array.length, 0.0); }, | 2093 Expect.throws(() { array.insertRange(0, array.length, 0.0); }, |
2134 (e) { return e is UnsupportedError; }); | 2094 (e) { return e is UnsupportedError; }); |
2135 Expect.throws(() { array.length = 0; }, | 2095 Expect.throws(() { array.length = 0; }, |
2136 (e) { return e is UnsupportedError; }); | 2096 (e) { return e is UnsupportedError; }); |
2137 Expect.throws(() { array.removeLast(); }, | 2097 Expect.throws(() { array.removeLast(); }, |
2138 (e) { return e is UnsupportedError; }); | 2098 (e) { return e is UnsupportedError; }); |
2139 Expect.throws(() { array.removeRange(0, array.length - 1); }, | 2099 Expect.throws(() { array.removeRange(0, array.length - 1); }, |
2140 (e) { return e is UnsupportedError; }); | 2100 (e) { return e is UnsupportedError; }); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2205 testFloat32ListView(); | 2165 testFloat32ListView(); |
2206 testFloat64ListView(); | 2166 testFloat64ListView(); |
2207 } | 2167 } |
2208 } | 2168 } |
2209 | 2169 |
2210 main() { | 2170 main() { |
2211 for (var i=0; i<1000; i++) { | 2171 for (var i=0; i<1000; i++) { |
2212 OptimizedByteArrayTest.testMain(); | 2172 OptimizedByteArrayTest.testMain(); |
2213 } | 2173 } |
2214 } | 2174 } |
OLD | NEW |