summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-02-21 20:09:37 (GMT)
committernijtmans <nijtmans>2010-02-21 20:09:37 (GMT)
commitc0efda860028550fa1392602cb9d479a67c7cf55 (patch)
tree107091c0a01f164224f02d295ebb0a866b39c5d4 /tests
parent3fb3008b2698db7d2a9f46adeac8c91565ba890b (diff)
downloadtcl-c0efda860028550fa1392602cb9d479a67c7cf55.zip
tcl-c0efda860028550fa1392602cb9d479a67c7cf55.tar.gz
tcl-c0efda860028550fa1392602cb9d479a67c7cf55.tar.bz2
Follow-up to Fix [Bug 2954959] expr abs(0.0) is -0.0
Some more tests, showing that the LONG implementation was not quite correct too, and a fix for that. Some more internal "const" additions
Diffstat (limited to 'tests')
-rw-r--r--tests/expr.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/expr.test b/tests/expr.test
index cbba243..05fc956 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: expr.test,v 1.77 2010/02/21 08:56:19 nijtmans Exp $
+# RCS: @(#) $Id: expr.test,v 1.78 2010/02/21 20:09:38 nijtmans Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -6691,6 +6691,18 @@ test expr-38.8 {abs and 0.0 [Bug 2954959]} {
test expr-38.9 {abs and 0.0 [Bug 2954959]} {
expr {abs(0.0)}
} 0.0
+test expr-38.10 {abs and -0x0 [Bug 2954959]} {
+ expr {abs(-0x0)}
+} 0
+test expr-38.11 {abs and 0x0 [Bug 2954959]} {
+ ::tcl::mathfunc::abs { 0x0}
+} { 0x0}
+test expr-38.12 {abs and -0x0 [Bug 2954959]} {
+ ::tcl::mathfunc::abs { -0x0}
+} 0
+test expr-38.13 {abs and 0.0 [Bug 2954959]} {
+ ::tcl::mathfunc::abs 1e-324
+} 1e-324
testConstraint testexprlongobj [llength [info commands testexprlongobj]]
testConstraint testexprdoubleobj [llength [info commands testexprdoubleobj]]