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

Unified Diff: utils/tests/pub/test_pub.dart

Issue 12335113: Unit test changes: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « pkg/unittest/lib/unittest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/test_pub.dart
===================================================================
--- utils/tests/pub/test_pub.dart (revision 19164)
+++ utils/tests/pub/test_pub.dart (working copy)
@@ -592,7 +592,7 @@
failures.addAll(result.stderr.map((line) => '| $line'));
}
- throw new ExpectException(failures.join('\n'));
+ throw new TestFailure(failures.join('\n'));
}
return null;
@@ -869,7 +869,7 @@
var entry = path.join(dir, name);
return defer(() {
if (!entryExists(entry)) {
- throw new ExpectException('Entry $entry not found.');
+ throw new TestFailure('Entry $entry not found.');
}
return validate(entry);
});
@@ -886,7 +886,7 @@
return listDir(dir).then((files) {
var matches = files.where((file) => endsWithPattern(file, name)).toList();
if (matches.isEmpty) {
- throw new ExpectException('No files in $dir match pattern $name.');
+ throw new TestFailure('No files in $dir match pattern $name.');
}
if (matches.length == 1) return validate(matches[0]);
@@ -906,7 +906,7 @@
error.add(" $failure\n");
}
completer.completeError(
- new ExpectException(error.toString()), stackTrace);
+ new TestFailure(error.toString()), stackTrace);
}
for (var match in matches) {
@@ -953,7 +953,7 @@
var text = readTextFile(file);
if (text == textContents) return null;
- throw new ExpectException(
+ throw new TestFailure(
'File $file should contain:\n\n$textContents\n\n'
'but contained:\n\n$text');
});
@@ -1183,7 +1183,7 @@
Future validate(String dir) {
return defer(() {
if (entryExists(path.join(dir, name))) {
- throw new ExpectException('File $name in $dir should not exist.');
+ throw new TestFailure('File $name in $dir should not exist.');
}
});
}
@@ -1360,7 +1360,7 @@
return _printStreams();
}).then((_) {
- registerException(new ExpectException("Process $name ended "
+ registerException(new TestFailure("Process $name ended "
"earlier than scheduled with exit code $exitCode"));
});
}).catchError((e) => registerException(e.error, e.stackTrace));
« no previous file with comments | « pkg/unittest/lib/unittest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698