Index: pkg/expect/lib/expect.dart |
diff --git a/pkg/expect/lib/expect.dart b/pkg/expect/lib/expect.dart |
index c9810b03504f6398de48e8318643a343785c16f6..3acf5327714806aa3898bd8ce9af08d2b0421e22 100644 |
--- a/pkg/expect/lib/expect.dart |
+++ b/pkg/expect/lib/expect.dart |
@@ -460,6 +460,10 @@ class Expect { |
Expect.throws(f, (error) => error is ArgumentError, "ArgumentError"); |
} |
+ static void throwsAssertionError(void f()) { |
+ Expect.throws(f, (error) => error is AssertionError, "AssertionError"); |
+ } |
+ |
static void throwsCastError(void f()) { |
Expect.throws(f, (error) => error is CastError, "CastError"); |
} |