summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-02-21 08:56:19 (GMT)
committernijtmans <nijtmans>2010-02-21 08:56:19 (GMT)
commit5330abf13c39fb141897f214a8e8beaddb51a7f5 (patch)
tree647f1caa3c8ab23d87e432bd486d433d42528436 /tests
parent9f18dbce0e4a7064e46cf22f9950b5cb220f21a4 (diff)
downloadtcl-5330abf13c39fb141897f214a8e8beaddb51a7f5.zip
tcl-5330abf13c39fb141897f214a8e8beaddb51a7f5.tar.gz
tcl-5330abf13c39fb141897f214a8e8beaddb51a7f5.tar.bz2
Fix [Bug 2954959] expr abs(0.0) is -0.0
and added test cases for it.
Diffstat (limited to 'tests')
-rw-r--r--tests/expr.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/expr.test b/tests/expr.test
index f1612b6..cbba243 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.76 2009/08/12 16:06:44 dgp Exp $
+# RCS: @(#) $Id: expr.test,v 1.77 2010/02/21 08:56:19 nijtmans Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -6685,6 +6685,12 @@ test expr-38.6 {abs and -0 [Bug 1893815]} {
test expr-38.7 {abs and -0 [Bug 1893815]} {
::tcl::mathfunc::abs -1e-324
} 0.0
+test expr-38.8 {abs and 0.0 [Bug 2954959]} {
+ ::tcl::mathfunc::abs 0.0
+} 0.0
+test expr-38.9 {abs and 0.0 [Bug 2954959]} {
+ expr {abs(0.0)}
+} 0.0
testConstraint testexprlongobj [llength [info commands testexprlongobj]]
testConstraint testexprdoubleobj [llength [info commands testexprdoubleobj]]