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

Unified Diff: pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart

Issue 24276010: Change package scheduled_test to throw TestFailures rather than strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
Index: pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
diff --git a/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
index 8a80be259c092762562e9c2cb5f1825d7d72c7f7..590a1ce140afe3c32c750ded8664fbbdae2c5fe3 100644
--- a/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
@@ -27,10 +27,9 @@ class NothingDescriptor extends Descriptor {
if (parent == null) parent = defaultRoot;
var fullPath = path.join(parent, name);
if (new File(fullPath).existsSync()) {
- throw "Expected nothing to exist at '$fullPath', but found a file.";
+ fail("Expected nothing to exist at '$fullPath', but found a file.");
} else if (new Directory(fullPath).existsSync()) {
- throw "Expected nothing to exist at '$fullPath', but found a "
- "directory.";
+ fail("Expected nothing to exist at '$fullPath', but found a directory.");
} else {
return;
}

Powered by Google App Engine
This is Rietveld 408576698