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

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: Remove checks and comments on type of exception thrown. 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..92ebfada9ee366e3e587eefb5679cb98892c3705 100644
--- a/pkg/scheduled_test/test/scheduled_process_test.dart
+++ b/pkg/scheduled_test/test/scheduled_process_test.dart
@@ -63,9 +63,7 @@ void main() {
});
test('test 2', () {
- expect(errors, everyElement(new isInstanceOf<ScheduleError>()));
- expect(errors.length, equals(1));
- expect(errors.first.error, new isInstanceOf<TestFailure>());
+ expect(errors.single, new isInstanceOf<ScheduleError>());
});
}, passing: ['test 2']);
@@ -143,7 +141,7 @@ 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.toString(), matches(r"^Process "
r"'[^']+[\\/]dart(\.exe)? [^']+' ended earlier than scheduled with "
r"exit code 0\."));
}
@@ -196,7 +194,7 @@ 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.toString(), matches(r"^Process "
r"'[^']+[\\/]dart(\.exe)? [^']+' ended earlier than scheduled with "
r"exit code 0\."));
}
@@ -240,7 +238,7 @@ 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.toString(), matches(r"^Process "
r"'[^']+[\\/]dart(\.exe)? [^']+' ended earlier than scheduled with "
r"exit code 0\."));
}

Powered by Google App Engine
This is Rietveld 408576698