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

Unified Diff: pkg/scheduled_test/test/scheduled_process_test.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/test/scheduled_process_test.dart
diff --git a/pkg/scheduled_test/test/scheduled_process_test.dart b/pkg/scheduled_test/test/scheduled_process_test.dart
index 5aaae605fedc1a9ee52dc9754f6985e47b4bcb7f..3a9872c19df7a5368ea249a0cab6f83dabb6ebaf 100644
--- a/pkg/scheduled_test/test/scheduled_process_test.dart
+++ b/pkg/scheduled_test/test/scheduled_process_test.dart
@@ -143,7 +143,8 @@ void main() {
// Whether or not this error appears depends on how quickly the "no
// elements" error is handled.
if (errors.length == 2) {
- expect(errors[1].error, matches(r"^Process "
+ expect(errors[1].error, new isInstanceOf<TestFailure>());
+ expect(errors[1].error.message, matches(r"^Process "
r"'[^']+[\\/]dart(\.exe)? [^']+' ended earlier than scheduled with "
r"exit code 0\."));
}
@@ -196,7 +197,8 @@ void main() {
// Whether or not this error appears depends on how quickly the "no
// elements" error is handled.
if (errors.length == 2) {
- expect(errors[1].error, matches(r"^Process "
+ expect(errors[1].error, new isInstanceOf<TestFailure>());
+ expect(errors[1].error.message, matches(r"^Process "
r"'[^']+[\\/]dart(\.exe)? [^']+' ended earlier than scheduled with "
r"exit code 0\."));
}
@@ -240,7 +242,8 @@ void main() {
// Whether or not this error appears depends on how quickly the "no
// elements" error is handled.
if (errors.length == 2) {
- expect(errors[1].error, matches(r"^Process "
+ expect(errors[1].error, new isInstanceOf<TestFailure>());
+ expect(errors[1].error.message, matches(r"^Process "
r"'[^']+[\\/]dart(\.exe)? [^']+' ended earlier than scheduled with "
r"exit code 0\."));
}

Powered by Google App Engine
This is Rietveld 408576698