Index: pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart |
diff --git a/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart |
index eca863ae772dadbe669266d36fe3715e57f422b3..9111b3dd656824a6a479bfd1610d70727fe21d7b 100644 |
--- a/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart |
+++ b/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart |
@@ -59,7 +59,7 @@ abstract class FileDescriptor extends Descriptor implements ReadableDescriptor { |
if (parent == null) parent = defaultRoot; |
var fullPath = path.join(parent, name); |
if (!new File(fullPath).existsSync()) { |
- throw "File not found: '$fullPath'."; |
+ fail("File not found: '$fullPath'."); |
} |
return new File(fullPath).readAsBytes().then(_validateNow); |
@@ -84,7 +84,7 @@ class _BinaryFileDescriptor extends FileDescriptor { |
Future _validateNow(List<int> actualContents) { |
if (orderedIterableEquals(contents, actualContents)) return null; |
// TODO(nweiz): show a hex dump here if the data is small enough. |
- throw "File '$name' didn't contain the expected binary data."; |
+ fail("File '$name' didn't contain the expected binary data."); |
} |
} |