mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-03 16:20:39 +02:00
Use the with-test-prefix/c&e' for the
1+' and `1-' tests.
* test-suite/tests/numbers.test ("1+"): Use `with-test-prefix/c&e' instead of `with-test-prefix'. Provide a name to each `pass-if' invocation. ("1-"): Likewise.
This commit is contained in:
parent
fb032fa722
commit
f13f1e9f6f
1 changed files with 18 additions and 14 deletions
|
@ -101,41 +101,45 @@
|
||||||
;;; 1+
|
;;; 1+
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(with-test-prefix "1+"
|
(with-test-prefix/c&e "1+"
|
||||||
|
|
||||||
(pass-if "documented?"
|
(pass-if "documented?"
|
||||||
(documented? 1+))
|
(documented? 1+))
|
||||||
|
|
||||||
(pass-if (eqv? 1 (1+ 0)))
|
(pass-if "0" (eqv? 1 (1+ 0)))
|
||||||
(pass-if (eqv? 0 (1+ -1)))
|
(pass-if "-1" (eqv? 0 (1+ -1)))
|
||||||
(pass-if (eqv? 101 (1+ 100)))
|
(pass-if "100" (eqv? 101 (1+ 100)))
|
||||||
(pass-if (eqv? -99 (1+ -100)))
|
(pass-if "-100" (eqv? -99 (1+ -100)))
|
||||||
|
|
||||||
;; The maximum fixnum on a 32-bit architecture: 2^29 - 1.
|
;; The maximum fixnum on a 32-bit architecture: 2^29 - 1.
|
||||||
(pass-if (eqv? 536870912 (1+ 536870911)))
|
(pass-if "1+ fixnum = bignum (32-bit)"
|
||||||
|
(eqv? 536870912 (1+ 536870911)))
|
||||||
|
|
||||||
;; The maximum fixnum on a 64-bit architecture: 2^61 - 1.
|
;; The maximum fixnum on a 64-bit architecture: 2^61 - 1.
|
||||||
(pass-if (eqv? 2305843009213693952 (1+ 2305843009213693951))))
|
(pass-if "1+ fixnum = bignum (64-bit)"
|
||||||
|
(eqv? 2305843009213693952 (1+ 2305843009213693951))))
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; 1-
|
;;; 1-
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(with-test-prefix "1-"
|
(with-test-prefix/c&e "1-"
|
||||||
|
|
||||||
(pass-if "documented?"
|
(pass-if "documented?"
|
||||||
(documented? 1-))
|
(documented? 1-))
|
||||||
|
|
||||||
(pass-if (eqv? -1 (1- 0)))
|
(pass-if "0" (eqv? -1 (1- 0)))
|
||||||
(pass-if (eqv? 0 (1- 1)))
|
(pass-if "1" (eqv? 0 (1- 1)))
|
||||||
(pass-if (eqv? 99 (1- 100)))
|
(pass-if "100" (eqv? 99 (1- 100)))
|
||||||
(pass-if (eqv? -101 (1- -100)))
|
(pass-if "-100" (eqv? -101 (1- -100)))
|
||||||
|
|
||||||
;; The minimum fixnum on a 32-bit architecture: -2^29.
|
;; The minimum fixnum on a 32-bit architecture: -2^29.
|
||||||
(pass-if (eqv? -536870913 (1- -536870912)))
|
(pass-if "1- fixnum = bignum (32-bit)"
|
||||||
|
(eqv? -536870913 (1- -536870912)))
|
||||||
|
|
||||||
;; The minimum fixnum on a 64-bit architecture: -2^61.
|
;; The minimum fixnum on a 64-bit architecture: -2^61.
|
||||||
(pass-if (eqv? -2305843009213693953 (1- -2305843009213693952))))
|
(pass-if "1- fixnum = bignum (64-bit)"
|
||||||
|
(eqv? -2305843009213693953 (1- -2305843009213693952))))
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; ash
|
;;; ash
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue