summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-11-17 16:24:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-11-17 16:24:37 (GMT)
commit205419d4b7c3801fe37ae41bceba18fc3b230308 (patch)
tree4e47d8e8427fcbad172ecc5ae3e1199345b1aef7 /tests
parent0be726feecac0c0515760b48dd64f435024dd908 (diff)
parent3aefaf62e4de2181582277bb60fe2a4ee5c506a2 (diff)
downloadtcl-205419d4b7c3801fe37ae41bceba18fc3b230308.zip
tcl-205419d4b7c3801fe37ae41bceba18fc3b230308.tar.gz
tcl-205419d4b7c3801fe37ae41bceba18fc3b230308.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.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/obj.test b/tests/obj.test
index 151abfb..7273b40 100644
--- a/tests/obj.test
+++ b/tests/obj.test
@@ -626,6 +626,19 @@ test obj-33.7 {integer overflow on input} {
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
}