diff --git a/test-suite/ChangeLog b/test-suite/ChangeLog index 9f6893202..f1e0b0095 100644 --- a/test-suite/ChangeLog +++ b/test-suite/ChangeLog @@ -1,3 +1,7 @@ +2001-11-22 Dirk Herrmann + + * tests/numbers.test: Added division by zero tests. + 2001-11-17 Dirk Herrmann * tests/syntax.test: Added some tests, updated some others with diff --git a/test-suite/tests/numbers.test b/test-suite/tests/numbers.test index ab3b80234..505d31eb5 100644 --- a/test-suite/tests/numbers.test +++ b/test-suite/tests/numbers.test @@ -47,6 +47,9 @@ ;;; miscellaneous ;;; +(define exception:numerical-overflow + (cons 'numerical-overflow "^Numerical overflow")) + (define (documented? object) (not (not (object-documentation object)))) @@ -1343,6 +1346,21 @@ ;;; / ;;; +(with-test-prefix "/" + + (expect-fail "documented?" + (documented? /)) + + (with-test-prefix "division by zero" + + (pass-if-exception "(/ 0)" + exception:numerical-overflow + (/ 0)) + + (pass-if-exception "(/ 1 0)" + exception:numerical-overflow + (/ 1 0)))) + ;;; ;;; truncate ;;;