| Index: tests/html/typed_arrays_range_checks_test.dart
|
| diff --git a/tests/html/typed_arrays_range_checks_test.dart b/tests/html/typed_arrays_range_checks_test.dart
|
| index 6995afac7243b0dd36478cbb25641289903be880..6cb83530458553b0a885745c3ea7caf860d699f0 100644
|
| --- a/tests/html/typed_arrays_range_checks_test.dart
|
| +++ b/tests/html/typed_arrays_range_checks_test.dart
|
| @@ -18,18 +18,18 @@ main() {
|
| test('outOfRangeAccess_dynamic', () {
|
| var a = new Uint8List(1024);
|
|
|
| - expect(a[a.length], isNull);
|
| - expect(a[a.length + 1], isNull);
|
| - expect(a[a.length + 1024], isNull);
|
| + expect(() => a[a.length], throws);
|
| + expect(() => a[a.length + 1], throws);
|
| + expect(() => a[a.length + 1024], throws);
|
|
|
| // expect(a[-1], isNull);
|
| // expect(a[-2], isNull);
|
| // expect(a[-1024], isNull);
|
|
|
| // It's harder to test out of range setters, but let's do some minimum.
|
| - a[a.length] = 0xdeadbeaf;
|
| - a[a.length + 1] = 0xdeadbeaf;
|
| - a[a.length + 1024] = 0xdeadbeaf;
|
| + expect(() => a[a.length] = 0xdeadbeaf, throws);
|
| + expect(() => a[a.length + 1] = 0xdeadbeaf, throws);
|
| + expect(() => a[a.length + 1024] = 0xdeadbeaf, throws);
|
|
|
| // a[-1] = 0xdeadbeaf;
|
| // a[-2] = 0xdeadbeaf;
|
| @@ -39,18 +39,18 @@ main() {
|
| test('outOfRange_typed', () {
|
| Uint8List a = new Uint8List(1024);
|
|
|
| - expect(a[a.length], isNull);
|
| - expect(a[a.length + 1], isNull);
|
| - expect(a[a.length + 1024], isNull);
|
| + expect(() => a[a.length], throws);
|
| + expect(() => a[a.length + 1], throws);
|
| + expect(() => a[a.length + 1024], throws);
|
|
|
| // expect(a[-1], isNull);
|
| // expect(a[-2], isNull);
|
| // expect(a[-1024], isNull);
|
|
|
| // It's harder to test out of range setters, but let's do some minimum.
|
| - a[a.length] = 0xdeadbeaf;
|
| - a[a.length + 1] = 0xdeadbeaf;
|
| - a[a.length + 1024] = 0xdeadbeaf;
|
| + expect(() => a[a.length] = 0xdeadbeaf, throws);
|
| + expect(() => a[a.length + 1] = 0xdeadbeaf, throws);
|
| + expect(() => a[a.length + 1024] = 0xdeadbeaf, throws);
|
|
|
| // a[-1] = 0xdeadbeaf;
|
| // a[-2] = 0xdeadbeaf;
|
|
|