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

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

Issue 21520002: Add argument check to Directory and Link constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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_fuzz_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/directory_invalid_arguments_test.dart
diff --git a/tests/standalone/io/directory_invalid_arguments_test.dart b/tests/standalone/io/directory_invalid_arguments_test.dart
index 29f96c8828aa3991ad782f1be0f7386b6baad80e..1b35aa0a877bdd3e3af1ed5019a967be281df07f 100644
--- a/tests/standalone/io/directory_invalid_arguments_test.dart
+++ b/tests/standalone/io/directory_invalid_arguments_test.dart
@@ -22,29 +22,13 @@ void testFailingList(Directory d, var recursive) {
}
void testInvalidArguments() {
- Directory d = new Directory(12);
try {
- d.existsSync();
+ Directory d = new Directory(12);
Expect.fail("No exception thrown");
} catch (e) {
Expect.isTrue(e is ArgumentError);
}
- try {
- d.deleteSync();
- Expect.fail("No exception thrown");
- } catch (e) {
- Expect.isTrue(e is ArgumentError);
- }
- try {
- d.createSync();
- Expect.fail("No exception thrown");
- } catch (e) {
- Expect.isTrue(e is ArgumentError);
- }
- testFailingList(d, false);
- Expect.throws(() => d.listSync(recursive: true),
- (e) => e is ArgumentError);
- d = new Directory(".");
+ Directory d = new Directory(".");
testFailingList(d, 1);
Expect.throws(() => d.listSync(recursive: 1),
(e) => e is ArgumentError);
« no previous file with comments | « tests/standalone/io/directory_fuzz_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698