mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
Adding more test cases
This commit is contained in:
parent
0a366a8aca
commit
7e5c29b939
1 changed files with 13 additions and 0 deletions
13
test-bn.scm
13
test-bn.scm
|
@ -7,6 +7,16 @@
|
||||||
bignum2string(data, k, bn, obj_obj2int(radix));
|
bignum2string(data, k, bn, obj_obj2int(radix));
|
||||||
")
|
")
|
||||||
|
|
||||||
|
(define-c test-larger-bn
|
||||||
|
"(void *data, int argc, closure _, object k, object fx, object fx2, object radix)"
|
||||||
|
" bignum2_type *bn = gc_alloc_bignum2(data, 2);
|
||||||
|
C_bignum_digits(bn)[0] = obj_obj2int(fx2);
|
||||||
|
C_bignum_digits(bn)[1] = obj_obj2int(fx);
|
||||||
|
bn->num_digits = 2;
|
||||||
|
bn->sign = 0;
|
||||||
|
bignum2string(data, k, bn, obj_obj2int(radix));
|
||||||
|
")
|
||||||
|
|
||||||
(write
|
(write
|
||||||
(list
|
(list
|
||||||
(test-bn -10 10)
|
(test-bn -10 10)
|
||||||
|
@ -16,6 +26,9 @@
|
||||||
(test-bn #x0FFFffff 10)
|
(test-bn #x0FFFffff 10)
|
||||||
(test-bn #x0FFFffff 16)
|
(test-bn #x0FFFffff 16)
|
||||||
(test-bn #x3FFFffff 10)
|
(test-bn #x3FFFffff 10)
|
||||||
|
(test-bn #x0FFF0001 10)
|
||||||
|
(test-larger-bn 0 #x0FFF0001 10)
|
||||||
|
(test-larger-bn #x3FFF0000 #x0FFF0001 10)
|
||||||
))
|
))
|
||||||
(newline)
|
(newline)
|
||||||
;(repl)
|
;(repl)
|
||||||
|
|
Loading…
Add table
Reference in a new issue