Index: tests/standalone/io/file_invalid_arguments_test.dart |
diff --git a/tests/standalone/io/file_invalid_arguments_test.dart b/tests/standalone/io/file_invalid_arguments_test.dart |
index 1406290934e676d6a26c7636af278c7c9caa3284..e296d105fb189cdb7d56c4cc40955a579d40afb1 100644 |
--- a/tests/standalone/io/file_invalid_arguments_test.dart |
+++ b/tests/standalone/io/file_invalid_arguments_test.dart |
@@ -22,10 +22,10 @@ void testReadInvalidArgs(arg) { |
var readFuture = file.read(arg); |
readFuture.then((bytes) { |
Expect.fail('exception expected'); |
- }).catchError((e) { |
+ }).catchError((error) { |
errors++; |
- Expect.isTrue(e.error is FileIOException); |
- Expect.isTrue(e.error.toString().contains('Invalid arguments')); |
+ Expect.isTrue(error is FileIOException); |
+ Expect.isTrue(error.toString().contains('Invalid arguments')); |
file.close().then((ignore) { |
Expect.equals(1, errors); |
port.close(); |
@@ -49,10 +49,10 @@ void testReadListInvalidArgs(buffer, offset, length) { |
var readListFuture = file.readList(buffer, offset, length); |
readListFuture.then((bytes) { |
Expect.fail('exception expected'); |
- }).catchError((e) { |
+ }).catchError((error) { |
errors++; |
- Expect.isTrue(e.error is FileIOException); |
- Expect.isTrue(e.error.toString().contains('Invalid arguments')); |
+ Expect.isTrue(error is FileIOException); |
+ Expect.isTrue(error.toString().contains('Invalid arguments')); |
file.close().then((ignore) { |
Expect.equals(1, errors); |
port.close(); |
@@ -75,9 +75,9 @@ void testWriteByteInvalidArgs(value) { |
var writeByteFuture = file.writeByte(value); |
writeByteFuture.then((ignore) { |
Expect.fail('exception expected'); |
- }).catchError((s) { |
- Expect.isTrue(s.error is FileIOException); |
- Expect.isTrue(s.error.toString().contains('Invalid argument')); |
+ }).catchError((error) { |
+ Expect.isTrue(error is FileIOException); |
+ Expect.isTrue(error.toString().contains('Invalid argument')); |
file.close().then((ignore) { |
port.close(); |
}); |
@@ -99,9 +99,9 @@ void testWriteListInvalidArgs(buffer, offset, bytes) { |
var writeListFuture = file.writeList(buffer, offset, bytes); |
writeListFuture.then((ignore) { |
Expect.fail('exception expected'); |
- }).catchError((s) { |
- Expect.isTrue(s.error is FileIOException); |
- Expect.isTrue(s.error.toString().contains('Invalid arguments')); |
+ }).catchError((error) { |
+ Expect.isTrue(error is FileIOException); |
+ Expect.isTrue(error.toString().contains('Invalid arguments')); |
file.close().then((ignore) { |
port.close(); |
}); |
@@ -122,8 +122,8 @@ void testWriteStringInvalidArgs(string, encoding) { |
var writeStringFuture = file.writeString(string, encoding: encoding); |
writeStringFuture.then((ignore) { |
Expect.fail('exception expected'); |
- }).catchError((s) { |
- Expect.isTrue(s.error is FileIOException); |
+ }).catchError((error) { |
+ Expect.isTrue(error is FileIOException); |
file.close().then((ignore) { |
port.close(); |
}); |