| Index: tests/standalone/byte_array_test.dart
|
| diff --git a/tests/standalone/byte_array_test.dart b/tests/standalone/byte_array_test.dart
|
| index 11bccddb661fa517078e41cee997fd76e2502776..1565488ace4ed4c9adc3961b22f1067292be9c6e 100644
|
| --- a/tests/standalone/byte_array_test.dart
|
| +++ b/tests/standalone/byte_array_test.dart
|
| @@ -107,9 +107,15 @@ void testSubArray() {
|
| testThrowsIndex(() => array.subByteArray(11));
|
| testThrowsIndex(() => array.subByteArray(11, null));
|
| testThrowsIndex(() => array.subByteArray(6, 5));
|
| - Expect.throws(() => array.subByteArray(0, "5"), (e) => e is ArgumentError);
|
| - Expect.throws(() => array.subByteArray("0", 5), (e) => e is ArgumentError);
|
| - Expect.throws(() => array.subByteArray("0"), (e) => e is ArgumentError);
|
| +
|
| + bool checkedMode = false;
|
| + assert(checkedMode = true);
|
| + if (!checkedMode) {
|
| + // In checked mode these will necessarily throw a TypeError.
|
| + Expect.throws(() => array.subByteArray(0, "5"), (e) => e is ArgumentError);
|
| + Expect.throws(() => array.subByteArray("0", 5), (e) => e is ArgumentError);
|
| + Expect.throws(() => array.subByteArray("0"), (e) => e is ArgumentError);
|
| + }
|
| Expect.throws(() => array.subByteArray(null), (e) => e is ArgumentError);
|
| }
|
|
|
|
|