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

Unified Diff: pkg/http/test/utils.dart

Issue 11830017: Fix ALL the pub tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/http/test/utils.dart
diff --git a/pkg/http/test/utils.dart b/pkg/http/test/utils.dart
index 53ff769bbf68a1a16a3a2ab3250cbbf85e75e074..003cf398bbe1577f80a68a4e4c24ea2fd4568d76 100644
--- a/pkg/http/test/utils.dart
+++ b/pkg/http/test/utils.dart
@@ -178,3 +178,15 @@ class _RedirectLimitExceededException extends TypeMatcher {
bool matches(item, MatchState matchState) =>
item is RedirectLimitExceededException;
}
+
+/// A matcher for SocketIOExceptions.
+const isSocketIOException = const _SocketIOException();
+
+/// A matcher for functions that throw SocketIOException.
+const Matcher throwsSocketIOException =
+ const Throws(isSocketIOException);
+
+class _SocketIOException extends TypeMatcher {
+ const _SocketIOException() : super("SocketIOException");
+ bool matches(item, MatchState matchState) => item is SocketIOException;
+}

Powered by Google App Engine
This is Rietveld 408576698