From 28491d9152b5206e3dd54fc448eb13f7c5325501 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 31 Aug 2012 15:22:20 -0700 Subject: [PATCH] math: adding some tests for bignum bitnot. --- core/math/math-tests.factor | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/math/math-tests.factor b/core/math/math-tests.factor index 8cbc951a36..1a729fcef4 100644 --- a/core/math/math-tests.factor +++ b/core/math/math-tests.factor @@ -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