summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--tests/obj.test14
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c769e48..8955a24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2002-04-26 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+ * tests/obj.test (obj-11.[56]): Test conversion to boolean more
+ thoroughly.
* generic/tclObj.c (SetBooleanFromAny): Was not calling an integer
parsing function on native 64-bit platforms! [Bug 548686]
diff --git a/tests/obj.test b/tests/obj.test
index 8512049..c4ec7d4 100644
--- a/tests/obj.test
+++ b/tests/obj.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: obj.test,v 1.6 2001/11/14 23:16:36 hobbs Exp $
+# RCS: @(#) $Id: obj.test,v 1.7 2002/04/26 08:43:38 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -197,6 +197,18 @@ test obj-11.4 {Tcl_GetBooleanFromObj, error converting from "empty string"} {
lappend result [catch {testbooleanobj not 1} msg]
lappend result $msg
} {{} 1 {expected boolean value but got ""}}
+test obj-11.5 {Tcl_GetBooleanFromObj, convert hex to boolean} {
+ set result ""
+ lappend result [teststringobj set 1 0xac]
+ lappend result [testbooleanobj not 1]
+ lappend result [testobj type 1]
+} {0xac 0 boolean}
+test obj-11.6 {Tcl_GetBooleanFromObj, convert float to boolean} {
+ set result ""
+ lappend result [teststringobj set 1 5.42]
+ lappend result [testbooleanobj not 1]
+ lappend result [testobj type 1]
+} {5.42 0 boolean}
test obj-12.1 {DupBooleanInternalRep} {
set result ""