Skip to content

Commit 1556d89

Browse files
use exception type in array tests
1 parent df9ebe6 commit 1556d89

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/pixie/tests/test-arrays.pxi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
(t/deftest test-alength
1212
(let [a (make-array 10)]
1313
(t/assert= (alength a) 10)
14-
(t/assert-throws? RuntimeException
14+
(t/assert-throws? :pixie.stdlib/AssertionException
1515
(alength []))))
1616

1717
(t/deftest test-aget-and-aset
@@ -25,10 +25,10 @@
2525
(dotimes [i 10]
2626
(t/assert= (aget a i) i))
2727

28-
(t/assert-throws? RuntimeException
28+
(t/assert-throws? :pixie.stdlib/AssertionException
2929
(aget a 1.0))
3030

31-
(t/assert-throws? RuntimeException
31+
(t/assert-throws? :pixie.stdlib/AssertionException
3232
(aset a 1.0 :foo))))
3333

3434
(t/deftest test-aconcat
@@ -44,10 +44,10 @@
4444
(dotimes [i 20]
4545
(t/assert= (aget a3 i) i)))
4646

47-
(t/assert-throws? RuntimeException
47+
(t/assert-throws? :pixie.stdlib/AssertionException
4848
(t/aconcat a1 []))
4949

50-
(t/assert-throws? RuntimeException
50+
(t/assert-throws? :pixie.stdlib/AssertionException
5151
(t/aconcat a1 '()))))
5252

5353
(t/deftest test-aslice
@@ -62,13 +62,13 @@
6262
(foreach [i (range 0 3)]
6363
(t/assert= (aget a2 i) (+ i 7))))
6464

65-
(t/assert-throws? RuntimeException
65+
(t/assert-throws? :pixie.stdlib/AssertionException
6666
(aslice [1 2 3 4] 0 2))
6767

68-
(t/assert-throws? RuntimeException
68+
(t/assert-throws? :pixie.stdlib/AssertionException
6969
(aslice '() 0 2))
7070

71-
(t/assert-throws? RuntimeException
71+
(t/assert-throws? :pixie.stdlib/AssertionException
7272
(aslice a 1.0 2))))
7373

7474

0 commit comments

Comments
 (0)