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

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: Address comments. 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
« no previous file with comments | « tests/standalone/io/file_error_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cea8a134df95f05097dc9b99de90668cd9b1bc85..5f7f73f22c11e3dee26d4d5af7cbd7965dc259c1 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 testReadIntoInvalidArgs(buffer, start, end) {
var readIntoFuture = file.readInto(buffer, start, end);
readIntoFuture.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 testWriteFromInvalidArgs(buffer, start, end) {
var writeFromFuture = file.writeFrom(buffer, start, end);
writeFromFuture.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();
});
« no previous file with comments | « tests/standalone/io/file_error_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698