3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
12 # $Id: tkt3922.test,v 1.2 2009/06/26 14:17:47 shane Exp $
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
17 if {[working_64bit_int]} {
20 CREATE TABLE t1(a NUMBER);
21 INSERT INTO t1 VALUES('-9223372036854775808');
22 SELECT a, typeof(a) FROM t1;
24 } {-9223372036854775808 integer}
26 # this alternate version of tkt3922.1 doesn't
27 # really test the same thing as the original,
28 # but is needed to create the table and
29 # provided simply as a place holder for
30 # platforms without working 64bit support.
33 CREATE TABLE t1(a NUMBER);
34 INSERT INTO t1 VALUES('-1');
35 SELECT a, typeof(a) FROM t1;
39 do_realnum_test tkt3922.2 {
42 INSERT INTO t1 VALUES('-9223372036854775809');
43 SELECT a, typeof(a) FROM t1;
45 } {-9.22337203685478e+18 real}
46 do_realnum_test tkt3922.3 {
49 INSERT INTO t1 VALUES('-9223372036854776832');
50 SELECT a, typeof(a) FROM t1;
52 } {-9.22337203685478e+18 real}
53 do_realnum_test tkt3922.4 {
56 INSERT INTO t1 VALUES('-9223372036854776833');
57 SELECT a, typeof(a) FROM t1;
59 } {-9.22337203685478e+18 real}
60 if {[working_64bit_int]} {
64 INSERT INTO t1 VALUES('9223372036854775807');
65 SELECT a, typeof(a) FROM t1;
67 } {9223372036854775807 integer}
69 # this alternate version of tkt3922.5 doesn't
70 # really test the same thing as the original,
71 # but provided simply as a place holder for
72 # platforms without working 64bit support.
76 INSERT INTO t1 VALUES('1');
77 SELECT a, typeof(a) FROM t1;
81 do_realnum_test tkt3922.6 {
84 INSERT INTO t1 VALUES('9223372036854775808');
85 SELECT a, typeof(a) FROM t1;
87 } {9.22337203685478e+18 real}