Skip to content

Commit 034349d

Browse files
author
David Schaefer
committed
added to_float exception test
1 parent 780ee38 commit 034349d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/pixie/tests/test-ffi.pxi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@
4848
(t/assert= 0.5 (asinf (sinf 0.5)))
4949
(t/assert= 1.0 (+ (powf (sinf 0.5) 2.0) (powf (cosf 0.5) 2.0))))
5050

51+
(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)))
58+
)
5159

5260
(t/deftest test-ffi-callbacks
5361
(let [MAX 255

0 commit comments

Comments
 (0)