(lognot): Add tests.
authorKevin Ryde <user42@zip.com.au>
Sat, 30 Aug 2003 00:00:58 +0000 (00:00 +0000)
committerKevin Ryde <user42@zip.com.au>
Sat, 30 Aug 2003 00:00:58 +0000 (00:00 +0000)
test-suite/tests/numbers.test

index 5cbe40e..8ba9759 100644 (file)
       (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))))