1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# This file is a Tcl script to test the code in the file tclUtil.c.
# This file is organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: util.test,v 1.2 1998/09/14 18:40:14 stanton Exp $
if {[info commands testobj] == {}} {
puts "This application hasn't been compiled with the \"testobj\""
puts "command, so I can't test the Tcl type and object support."
return
}
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# This file is a Tcl script to test the code in the file tclUtil.c.
# This file is organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: util.test,v 1.3 1998/11/02 23:04:15 stanton Exp $
if {[info commands testobj] == {}} {
puts "This application hasn't been compiled with the \"testobj\""
puts "command, so I can't test the Tcl type and object support."
return
}
|
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
set tcl_precision 5
concat x[expr 1.123412341234]
} {x1.1234}
set tcl_precision 12
test util-6.4 {Tcl_PrintDouble - make sure there's a decimal point} {
concat x[expr 2.0]
} {x2.0}
test util-6.5 {Tcl_PrintDouble - make sure there's a decimal point} {
concat x[expr 3.0e98]
} {x3e+98}
test util-7.1 {TclPrecTraceProc - unset callbacks} {
set tcl_precision 7
set x $tcl_precision
unset tcl_precision
|
|
|
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
set tcl_precision 5
concat x[expr 1.123412341234]
} {x1.1234}
set tcl_precision 12
test util-6.4 {Tcl_PrintDouble - make sure there's a decimal point} {
concat x[expr 2.0]
} {x2.0}
test util-6.5 {Tcl_PrintDouble - make sure there's a decimal point} {eformat} {
concat x[expr 3.0e98]
} {x3e+98}
test util-7.1 {TclPrecTraceProc - unset callbacks} {
set tcl_precision 7
set x $tcl_precision
unset tcl_precision
|