]> gitweb.factorcode.org Git - factor.git/commitdiff
math: adding some tests for bignum bitnot.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 31 Aug 2012 22:22:20 +0000 (15:22 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 31 Aug 2012 22:22:20 +0000 (15:22 -0700)
core/math/math-tests.factor

index 8cbc951a36e36d38d95fbeada1690ca4ba8e4447..1a729fcef4db8dd4d1e5766ed468fc3b809f746b 100644 (file)
@@ -79,3 +79,10 @@ IN: math.tests
 [ t ] [ -0.0 neg? ] unit-test
 [ t ] [ -1.0 neg? ] unit-test
 [ t ] [ -1/0. neg? ] unit-test
+
+{ -0x3fffffff } [ 0x3ffffffe >bignum bitnot ] unit-test
+{ -0x40000000 } [ 0x3fffffff >bignum bitnot ] unit-test
+{ -0x40000001 } [ 0x40000000 >bignum bitnot ] unit-test
+{ -0x3fffffffffffffff } [ 0x3ffffffffffffffe >bignum bitnot ] unit-test
+{ -0x4000000000000000 } [ 0x3fffffffffffffff >bignum bitnot ] unit-test
+{ -0x4000000000000001 } [ 0x4000000000000000 >bignum bitnot ] unit-test