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

Unified Diff: pkg/scheduled_test/test/scheduled_server_test.dart

Issue 23591061: Make package:scheduled_test throw ScheduledServerErrors, not 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
« pkg/pkg.status ('K') | « pkg/pkg.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/test/scheduled_server_test.dart
diff --git a/pkg/scheduled_test/test/scheduled_server_test.dart b/pkg/scheduled_test/test/scheduled_server_test.dart
index b4cd897eb666c5137f069336b75d56c6d67c0b06..57d4b15cc92e46ce2dc69068cd8bf88cc35c16c9 100644
--- a/pkg/scheduled_test/test/scheduled_server_test.dart
+++ b/pkg/scheduled_test/test/scheduled_server_test.dart
@@ -170,10 +170,14 @@ void main() {
// wrapped twice it registers as a different exception each time (because
// it's given an ad-hoc stack trace). Always expect two exceptions when
// issue 9151 is fixed.
+ // Issue 9151 has been fixed, but there are still three errors reported.
+ // The second is now a copy of the first, rather than a copy of the third.
nweiz 2013/09/18 22:46:02 This comment shouldn't look like a conversation; i
expect(errors.length, inInclusiveRange(2, 3));
expect(errors[0].error, equals("'scheduled server 0' expected GET "
"/goodbye, but got GET /hello."));
- expect(errors[1].error, new isInstanceOf<HttpException>());
+ expect(errors[1].error, anyOf(new isInstanceOf<HttpException>(),
+ equals("'scheduled server 0' expected GET "
+ "/goodbye, but got GET /hello.")));
if (errors.length > 2) {
expect(errors[2].error, new isInstanceOf<HttpException>());
}
@@ -203,10 +207,14 @@ void main() {
// wrapped twice it registers as a different exception each time (because
// it's given an ad-hoc stack trace). Always expect two exceptions when
// issue 9151 is fixed.
+ // Issue 9151 has been fixed, but there are still three errors reported.
+ // The second is now a copy of the first, rather than a copy of the third.
expect(errors.length, inInclusiveRange(2, 3));
expect(errors[0].error, equals("'scheduled server 0' expected GET "
"/hello, but got HEAD /hello."));
- expect(errors[1].error, new isInstanceOf<HttpException>());
+ expect(errors[1].error, anyOf(new isInstanceOf<HttpException>(),
+ equals("'scheduled server 0' expected GET "
+ "/goodbye, but got GET /hello.")));
if (errors.length > 2) {
expect(errors[2].error, new isInstanceOf<HttpException>());
}
@@ -340,9 +348,13 @@ void main() {
// wrapped twice it registers as a different exception each time (because
// it's given an ad-hoc stack trace). Always expect two exceptions when
// issue 9151 is fixed.
+ // Issue 9151 has been fixed, but there are still three errors reported.
+ // The second is now a copy of the first, rather than a copy of the third.
expect(errors.length, inInclusiveRange(2, 3));
expect(errors[0].error, equals('oh no'));
- expect(errors[1].error, new isInstanceOf<HttpException>());
+ expect(errors[1].error, anyOf(new isInstanceOf<HttpException>(),
+ equals("'scheduled server 0' expected GET "
+ "/goodbye, but got GET /hello.")));
if (errors.length > 2) {
expect(errors[2].error, new isInstanceOf<HttpException>());
}
« pkg/pkg.status ('K') | « pkg/pkg.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698