1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

* lib.scm (exception:numerical-overflow): New define.

* tests/numbers.test (modulo-expt): Use it and
exception:wrong-type-arg, avoiding empty "" regexp which is invalid on
BSD.  Reported by Andreas Vögele.
This commit is contained in:
Kevin Ryde 2004-05-29 22:13:27 +00:00
parent 0825ae0b5b
commit 18ee5de9d4

View file

@ -804,27 +804,27 @@
(pass-if-exception
"Proper exception with 0 modulus"
(cons 'numerical-overflow "")
exception:numerical-overflow
(modulo-expt 17 23 0))
(pass-if-exception
"Proper exception when result not invertible"
(cons 'numerical-overflow "")
exception:numerical-overflow
(modulo-expt 10 -1 48))
(pass-if-exception
"Proper exception with wrong type argument"
(cons 'wrong-type-arg "")
exception:wrong-type-arg
(modulo-expt "Sam" 23 10))
(pass-if-exception
"Proper exception with wrong type argument"
(cons 'wrong-type-arg "")
exception:wrong-type-arg
(modulo-expt 17 9.9 10))
(pass-if-exception
"Proper exception with wrong type argument"
(cons 'wrong-type-arg "")
exception:wrong-type-arg
(modulo-expt 17 23 'Ethel)))
;;;