Skip to content

Commit

Permalink
Extensive check for crashes in #p
Browse files Browse the repository at this point in the history
Not an exhaustive test, which would be too slow, but quite extensive
(from 0 to 2^12).
  • Loading branch information
jpellegrini committed Dec 6, 2023
1 parent bb9f2e5 commit c5d4075
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test-misc.stk
Original file line number Diff line number Diff line change
Expand Up @@ -613,5 +613,11 @@ b|)
(map (lambda (thing) (address-ref (address-of thing)))
mylist)))

(test "#p shouldn't crash"
#void ;; return value from dotimes
(dotimes (i (expt 2 12)) ;; 12 so as to not slow down tests on older systems
(with-handler (lambda (a) -1)
(eval-from-string (format "#p~a" i )))))

;;------------------------------------------------------------------
(test-section-end)

0 comments on commit c5d4075

Please sign in to comment.