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

Unified Diff: tests/standalone/io/directory_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/directory_error_test.dart ('k') | tests/standalone/io/echo_server_stream_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/directory_test.dart
diff --git a/tests/standalone/io/directory_test.dart b/tests/standalone/io/directory_test.dart
index decf05d4b95f4231bceffcc0f5fb73eeb1e8a48e..d9ca0def964a1eb3bda2174fe2d15a9c18e2159b 100644
--- a/tests/standalone/io/directory_test.dart
+++ b/tests/standalone/io/directory_test.dart
@@ -89,9 +89,8 @@ class DirectoryTest {
setupListerHandlers(Stream<FileSystemEntity> stream) {
stream.listen(
(_) => Expect.fail("Listing of non-existing directory should fail"),
- onError: (e) {
- Expect.isTrue(e is AsyncError);
- Expect.isTrue(e.error is DirectoryIOException);
+ onError: (error) {
+ Expect.isTrue(error is DirectoryIOException);
});
}
new Directory("").createTemp().then((d) {
@@ -109,9 +108,8 @@ class DirectoryTest {
setupListHandlers(Stream<FileSystemEntity> stream) {
stream.listen(
(_) => Expect.fail("Listing of non-existing directory should fail"),
- onError: (e) {
- Expect.isTrue(e is AsyncError);
- Expect.isTrue(e.error is DirectoryIOException);
+ onError: (error) {
+ Expect.isTrue(error is DirectoryIOException);
if (++errors == 2) {
d.delete(recursive: true).then((_) {
port.close();
@@ -141,8 +139,8 @@ class DirectoryTest {
setupFutureHandlers(future) {
future.then((ignore) {
Expect.fail("Deletion of non-existing directory should fail");
- }).catchError((e) {
- Expect.isTrue(e.error is DirectoryIOException);
+ }).catchError((error) {
+ Expect.isTrue(error is DirectoryIOException);
});
}
@@ -169,8 +167,8 @@ class DirectoryTest {
}
var long = new Directory("${buffer.toString()}");
var errors = 0;
- onError(e) {
- Expect.isTrue(e.error is DirectoryIOException);
+ onError(error) {
+ Expect.isTrue(error is DirectoryIOException);
if (++errors == 2) {
d.delete(recursive: true).then((ignore) => port.close());
}
@@ -555,8 +553,8 @@ testCreateDirExistingFile() {
file.create().then((_) {
subDir.create()
.then((_) { Expect.fail("dir create should fail on existing file"); })
- .catchError((e) {
- Expect.isTrue(e.error is DirectoryIOException);
+ .catchError((error) {
+ Expect.isTrue(error is DirectoryIOException);
temp.delete(recursive: true).then((_) {
port.close();
});
« no previous file with comments | « tests/standalone/io/directory_error_test.dart ('k') | tests/standalone/io/echo_server_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698