diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-17 16:12:14 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-17 16:12:14 (GMT) |
commit | 3aefaf62e4de2181582277bb60fe2a4ee5c506a2 (patch) | |
tree | ce84219a5932e60edc4b6d0a8b9ee60cb721f33b /tests | |
parent | a9263ba9069329f5c9f64a6a965cfce12f18ab15 (diff) | |
download | tcl-3aefaf62e4de2181582277bb60fe2a4ee5c506a2.zip tcl-3aefaf62e4de2181582277bb60fe2a4ee5c506a2.tar.gz tcl-3aefaf62e4de2181582277bb60fe2a4ee5c506a2.tar.bz2 |
Fix libtommath's mp_radix_size() function such that it returns 2 for single-digit numbers. Add testcases for mp_radix_size() and mp_iseven(). Undo useless change in bn_mp_add_d.c (bring back libtommath's version).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/obj.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/obj.test b/tests/obj.test index 126d5ca..f8aae59 100644 --- a/tests/obj.test +++ b/tests/obj.test @@ -623,6 +623,19 @@ test obj-33.7 {integer overflow on input} {longIs32bit wideBiggerThanInt} { list [string is integer $x] [expr { wide($x) }] } {0 -4294967296} +test obj-34.1 {mp_iseven} testobj { + set result "" + lappend result [testbignumobj set 1 0] + lappend result [testbignumobj iseven 1] ; + lappend result [testobj type 1] +} {0 1 int} +test obj-34.2 {mp_radix_size} testobj { + set result "" + lappend result [testbignumobj set 1 9] + lappend result [testbignumobj radixsize 1] ; + lappend result [testobj type 1] +} {9 2 int} + if {[testConstraint testobj]} { testobj freeallvars } |