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; |
+} |