Skip to content

Commit d397fd8

Browse files
author
David Schaefer
committed
using assert-throws? in test-invalid-float-argument
1 parent 034349d commit d397fd8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/pixie/tests/test-ffi.pxi

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@
4949
(t/assert= 1.0 (+ (powf (sinf 0.5) 2.0) (powf (cosf 0.5) 2.0))))
5050

5151
(t/deftest test-invalid-float-argument
52-
(try
53-
(m/sin "nil")
54-
(catch ex (t/assert= (type ex) RuntimeException)))
55-
(try
56-
(m/exp nil)
57-
(catch ex (t/assert= (type ex) RuntimeException)))
52+
(t/assert-throws? (m/sin "nil"))
53+
(t/assert-throws? (m/sin nil))
5854
)
5955

6056
(t/deftest test-ffi-callbacks

0 commit comments

Comments
 (0)