diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-12-14 14:14:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-12-14 14:14:17 (GMT) |
commit | 82d0258052c45ac6767727539635540dc724182c (patch) | |
tree | 963258bf47328b692d688313d05078fc454802c3 /tests | |
parent | 9a259b172375b510de40955def893799c4359cf2 (diff) | |
download | tcl-jn_wide_printf.zip tcl-jn_wide_printf.tar.gz tcl-jn_wide_printf.tar.bz2 |
Implement all possible TCL_LL_MODIFIER formats in Tcl_ObjPrintf(), can be "ll", "I64" and "L", whatever the platform defines for long long integer. With test-cases.jn_wide_printf
Diffstat (limited to 'tests')
-rw-r--r-- | tests/util.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/util.test b/tests/util.test index 2ac11bf..1a3eecb 100644 --- a/tests/util.test +++ b/tests/util.test @@ -20,6 +20,7 @@ testConstraint testbytestring [llength [info commands testbytestring]] testConstraint testdstring [llength [info commands testdstring]] testConstraint testconcatobj [llength [info commands testconcatobj]] testConstraint testdoubledigits [llength [info commands testdoubledigits]] +testConstraint testprint [llength [info commands testprint]] # Big test for correct ordering of data in [expr] @@ -4017,6 +4018,30 @@ test util-17.1 {bankers' rounding [Bug 3349507]} {ieeeFloatingPoint} { 0x4400000000000000 0xc400000000000000 }] +test util-18.1 {Tcl_ObjPrintf} {testprint} { + testprint %lld [expr 2**63-1] +} {9223372036854775807} + +test util-18.2 {Tcl_ObjPrintf} {testprint} { + testprint %I64d [expr 2**63-1] +} {9223372036854775807} + +test util-18.3 {Tcl_ObjPrintf} {testprint} { + testprint %Ld [expr 2**63-1] +} {9223372036854775807} + +test util-18.4 {Tcl_ObjPrintf} {testprint} { + testprint %lld [expr -2**63] +} {-9223372036854775808} + +test util-18.5 {Tcl_ObjPrintf} {testprint} { + testprint %I64d [expr -2**63] +} {-9223372036854775808} + +test util-18.6 {Tcl_ObjPrintf} {testprint} { + testprint %Ld [expr -2**63] +} {-9223372036854775808} + set ::tcl_precision $saved_precision # cleanup |