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:
parent
0825ae0b5b
commit
18ee5de9d4
1 changed files with 5 additions and 5 deletions
|
@ -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)))
|
||||
|
||||
;;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue