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

Unified Diff: tests/standalone/src/io/DirectoryInvalidArgumentsTest.dart

Issue 9773018: Add error handling to directory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 8 years, 9 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/src/io/DirectoryErrorTest.dart ('k') | tests/standalone/src/io/DirectoryTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/io/DirectoryInvalidArgumentsTest.dart
diff --git a/tests/standalone/src/io/DirectoryInvalidArgumentsTest.dart b/tests/standalone/src/io/DirectoryInvalidArgumentsTest.dart
index 10c3ec0611af6dc76c8c28aaa389d4d455978241..c150369926878cd19238d350f1d17c13274bc839 100644
--- a/tests/standalone/src/io/DirectoryInvalidArgumentsTest.dart
+++ b/tests/standalone/src/io/DirectoryInvalidArgumentsTest.dart
@@ -20,18 +20,23 @@ class DirectoryInvalidArgumentsTest {
static void testInvalidArguments() {
Directory d = new Directory(12);
- Expect.isFalse(d.existsSync());
+ try {
+ d.existsSync();
+ Expect.fail("No exception thrown");
+ } catch (var e) {
+ Expect.isTrue(e is IllegalArgumentException);
+ }
try {
d.deleteSync();
Expect.fail("No exception thrown");
} catch (var e) {
- Expect.isTrue(e is DirectoryException);
+ Expect.isTrue(e is IllegalArgumentException);
}
try {
d.createSync();
Expect.fail("No exception thrown");
} catch (var e) {
- Expect.isTrue(e is DirectoryException);
+ Expect.isTrue(e is IllegalArgumentException);
}
testFailingList(d, false);
d = new Directory(".");
« no previous file with comments | « tests/standalone/src/io/DirectoryErrorTest.dart ('k') | tests/standalone/src/io/DirectoryTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698