Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1680)

Unified Diff: tests/standalone/io/file_invalid_arguments_test.dart

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild DOM and rebase. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
});

Powered by Google App Engine
This is Rietveld 408576698