mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
(lognot): Add tests.
This commit is contained in:
parent
53872505f0
commit
1ec2dd6fd2
1 changed files with 14 additions and 0 deletions
|
@ -2069,3 +2069,17 @@
|
|||
(pass-if n
|
||||
(= i (logcount n))))))
|
||||
|
||||
;;;
|
||||
;;; lognot
|
||||
;;;
|
||||
|
||||
(with-test-prefix "lognot"
|
||||
(pass-if (= -1 (lognot 0)))
|
||||
(pass-if (= 0 (lognot -1)))
|
||||
(pass-if (= -2 (lognot 1)))
|
||||
(pass-if (= 1 (lognot -2)))
|
||||
|
||||
(pass-if (= #x-100000000000000000000000000000000
|
||||
(lognot #xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)))
|
||||
(pass-if (= #xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
(lognot #x-100000000000000000000000000000000))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue