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

Unified Diff: tests/standalone/io/directory_fuzz_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 | « sdk/lib/io/link.dart ('k') | tests/standalone/io/directory_invalid_arguments_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/directory_fuzz_test.dart
diff --git a/tests/standalone/io/directory_fuzz_test.dart b/tests/standalone/io/directory_fuzz_test.dart
index dda9fe3f0e80c92694ae208f4e98386923787bd5..fb66b944036757143d51e49452898b0f24b55a3a 100644
--- a/tests/standalone/io/directory_fuzz_test.dart
+++ b/tests/standalone/io/directory_fuzz_test.dart
@@ -8,6 +8,7 @@
import 'dart:async';
import 'dart:io';
import 'dart:isolate';
+import "package:expect/expect.dart";
import 'fuzz_support.dart';
@@ -39,6 +40,11 @@ fuzzAsyncMethods() {
var port = new ReceivePort();
var futures = [];
typeMapping.forEach((k, v) {
+ if (v is! String) {
+ Expect.throws(() => new Directory(v),
+ (e) => e is ArgumentError);
+ return;
+ }
var d = new Directory(v);
futures.add(doItAsync(d.exists));
futures.add(doItAsync(d.create));
« no previous file with comments | « sdk/lib/io/link.dart ('k') | tests/standalone/io/directory_invalid_arguments_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698