diff --git a/packages/geometry/test/src/geometry_test.dart b/packages/geometry/test/src/geometry_test.dart index 3a288f3f..189ac259 100644 --- a/packages/geometry/test/src/geometry_test.dart +++ b/packages/geometry/test/src/geometry_test.dart @@ -42,18 +42,18 @@ void main() { ], step: 2, ), - throwsA(const TypeMatcher()), + throwsA(isA()), ); }); test('fails if not enough control points', () { expect( () => calculateBezierCurve(controlPoints: [Vector2.zero()]), - throwsA(const TypeMatcher()), + throwsA(isA()), ); expect( () => calculateBezierCurve(controlPoints: []), - throwsA(const TypeMatcher()), + throwsA(isA()), ); }); @@ -82,17 +82,23 @@ void main() { group('binomial', () { test('fails if k is negative', () { expect( - () => binomial(1, -1), throwsA(const TypeMatcher())); + () => binomial(1, -1), + throwsA(isA()), + ); }); test('fails if n is negative', () { expect( - () => binomial(-1, 1), throwsA(const TypeMatcher())); + () => binomial(-1, 1), + throwsA(isA()), + ); }); test('fails if n < k', () { expect( - () => binomial(1, 2), throwsA(const TypeMatcher())); + () => binomial(1, 2), + throwsA(isA()), + ); }); test('for a specific input gives a correct value', () { @@ -134,7 +140,7 @@ void main() { group('factorial', () { test('fails if negative number', () { - expect(() => factorial(-1), throwsA(const TypeMatcher())); + expect(() => factorial(-1), throwsA(isA())); }); test('for a specific input gives a correct value', () {