summaryrefslogtreecommitdiffstats
path: root/tests/get.test
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-16 00:46:29 (GMT)
committerstanton <stanton>1999-04-16 00:46:29 (GMT)
commit97464e6cba8eb0008cf2727c15718671992b913f (patch)
treece9959f2747257d98d52ec8d18bf3b0de99b9535 /tests/get.test
parenta8c96ddb94d1483a9de5e340b740cb74ef6cafa7 (diff)
downloadtcl-97464e6cba8eb0008cf2727c15718671992b913f.zip
tcl-97464e6cba8eb0008cf2727c15718671992b913f.tar.gz
tcl-97464e6cba8eb0008cf2727c15718671992b913f.tar.bz2
merged tcl 8.1 branch back into the main trunk
Diffstat (limited to 'tests/get.test')
-rw-r--r--tests/get.test41
1 files changed, 30 insertions, 11 deletions
diff --git a/tests/get.test b/tests/get.test
index bf746aa..261cf19 100644
--- a/tests/get.test
+++ b/tests/get.test
@@ -5,13 +5,16 @@
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: get.test,v 1.2 1998/09/14 18:40:09 stanton Exp $
+# RCS: @(#) $Id: get.test,v 1.3 1999/04/16 00:47:28 stanton Exp $
-if {[string compare test [info procs test]] == 1} then {source defs}
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
test get-1.1 {Tcl_GetInt procedure} {
set x 44
@@ -39,39 +42,39 @@ test get-1.6 {Tcl_GetInt procedure} {
} {1 {expected integer but got "16 x"}}
# The following tests are non-portable because they depend on
-# word size. 18446744073709551614
+# word size.
if {0x80000000 > 0} {
- test get-1.7 {Tcl_GetInt procedure} {nonPortable unixOnly} {
+ test get-1.7 {Tcl_GetInt procedure} {
set x 44
list [catch {incr x 18446744073709551616} msg] $msg $errorCode
} {1 {integer value too large to represent} {ARITH IOVERFLOW {integer value too large to represent}}}
- test get-1.8 {Tcl_GetInt procedure} {nonPortable} {
+ test get-1.8 {Tcl_GetInt procedure} {
set x 0
list [catch {incr x 18446744073709551614} msg] $msg
} {0 -2}
- test get-1.9 {Tcl_GetInt procedure} {nonPortable} {
+ test get-1.9 {Tcl_GetInt procedure} {
set x 0
list [catch {incr x +18446744073709551614} msg] $msg
} {0 -2}
- test get-1.10 {Tcl_GetInt procedure} {nonPortable} {
+ test get-1.10 {Tcl_GetInt procedure} {
set x 0
list [catch {incr x -18446744073709551614} msg] $msg
} {0 2}
} else {
- test get-1.7 {Tcl_GetInt procedure} {nonPortable unixOnly} {
+ test get-1.7 {Tcl_GetInt procedure} {
set x 44
list [catch {incr x 4294967296} msg] $msg $errorCode
} {1 {integer value too large to represent} {ARITH IOVERFLOW {integer value too large to represent}}}
- test get-1.8 {Tcl_GetInt procedure} {nonPortable} {
+ test get-1.8 {Tcl_GetInt procedure} {
set x 0
list [catch {incr x 4294967294} msg] $msg
} {0 -2}
- test get-1.9 {Tcl_GetInt procedure} {nonPortable} {
+ test get-1.9 {Tcl_GetInt procedure} {
set x 0
list [catch {incr x +4294967294} msg] $msg
} {0 -2}
- test get-1.10 {Tcl_GetInt procedure} {nonPortable} {
+ test get-1.10 {Tcl_GetInt procedure} {
set x 0
list [catch {incr x -4294967294} msg] $msg
} {0 2}
@@ -89,3 +92,19 @@ test get-2.3 {Tcl_GetInt procedure} {
test get-2.4 {Tcl_GetInt procedure} {nonPortable} {
list [catch {format %g .000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001} msg] $msg $errorCode
} {1 {floating-point value too small to represent} {ARITH UNDERFLOW {floating-point value too small to represent}}}
+
+# cleanup
+::tcltest::cleanupTests
+return
+
+
+
+
+
+
+
+
+
+
+
+