OLD | NEW |
1 # 2009 June 17 | 1 # 2009 June 17 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 18 matching lines...) Expand all Loading... |
29 # provided simply as a place holder for | 29 # provided simply as a place holder for |
30 # platforms without working 64bit support. | 30 # platforms without working 64bit support. |
31 do_test tkt3922.1 { | 31 do_test tkt3922.1 { |
32 execsql { | 32 execsql { |
33 CREATE TABLE t1(a NUMBER); | 33 CREATE TABLE t1(a NUMBER); |
34 INSERT INTO t1 VALUES('-1'); | 34 INSERT INTO t1 VALUES('-1'); |
35 SELECT a, typeof(a) FROM t1; | 35 SELECT a, typeof(a) FROM t1; |
36 } | 36 } |
37 } {-1 integer} | 37 } {-1 integer} |
38 } | 38 } |
39 do_test tkt3922.2 { | 39 do_realnum_test tkt3922.2 { |
40 execsql { | 40 execsql { |
41 DELETE FROM t1; | 41 DELETE FROM t1; |
42 INSERT INTO t1 VALUES('-9223372036854775809'); | 42 INSERT INTO t1 VALUES('-9223372036854775809'); |
43 SELECT a, typeof(a) FROM t1; | 43 SELECT a, typeof(a) FROM t1; |
44 } | 44 } |
45 } {-9.22337203685478e+18 real} | 45 } {-9.22337203685478e+18 real} |
46 do_test tkt3922.3 { | 46 do_realnum_test tkt3922.3 { |
47 execsql { | 47 execsql { |
48 DELETE FROM t1; | 48 DELETE FROM t1; |
49 INSERT INTO t1 VALUES('-9223372036854776832'); | 49 INSERT INTO t1 VALUES('-9223372036854776832'); |
50 SELECT a, typeof(a) FROM t1; | 50 SELECT a, typeof(a) FROM t1; |
51 } | 51 } |
52 } {-9.22337203685478e+18 real} | 52 } {-9.22337203685478e+18 real} |
53 do_test tkt3922.4 { | 53 do_realnum_test tkt3922.4 { |
54 execsql { | 54 execsql { |
55 DELETE FROM t1; | 55 DELETE FROM t1; |
56 INSERT INTO t1 VALUES('-9223372036854776833'); | 56 INSERT INTO t1 VALUES('-9223372036854776833'); |
57 SELECT a, typeof(a) FROM t1; | 57 SELECT a, typeof(a) FROM t1; |
58 } | 58 } |
59 } {-9.22337203685478e+18 real} | 59 } {-9.22337203685478e+18 real} |
60 if {[working_64bit_int]} { | 60 if {[working_64bit_int]} { |
61 do_test tkt3922.5 { | 61 do_test tkt3922.5 { |
62 execsql { | 62 execsql { |
63 DELETE FROM t1; | 63 DELETE FROM t1; |
64 INSERT INTO t1 VALUES('9223372036854775807'); | 64 INSERT INTO t1 VALUES('9223372036854775807'); |
65 SELECT a, typeof(a) FROM t1; | 65 SELECT a, typeof(a) FROM t1; |
66 } | 66 } |
67 } {9223372036854775807 integer} | 67 } {9223372036854775807 integer} |
68 } else { | 68 } else { |
69 # this alternate version of tkt3922.5 doesn't | 69 # this alternate version of tkt3922.5 doesn't |
70 # really test the same thing as the original, | 70 # really test the same thing as the original, |
71 # but provided simply as a place holder for | 71 # but provided simply as a place holder for |
72 # platforms without working 64bit support. | 72 # platforms without working 64bit support. |
73 do_test tkt3922.5 { | 73 do_test tkt3922.5 { |
74 execsql { | 74 execsql { |
75 DELETE FROM t1; | 75 DELETE FROM t1; |
76 INSERT INTO t1 VALUES('1'); | 76 INSERT INTO t1 VALUES('1'); |
77 SELECT a, typeof(a) FROM t1; | 77 SELECT a, typeof(a) FROM t1; |
78 } | 78 } |
79 } {1 integer} | 79 } {1 integer} |
80 } | 80 } |
81 do_test tkt3922.6 { | 81 do_realnum_test tkt3922.6 { |
82 execsql { | 82 execsql { |
83 DELETE FROM t1; | 83 DELETE FROM t1; |
84 INSERT INTO t1 VALUES('9223372036854775808'); | 84 INSERT INTO t1 VALUES('9223372036854775808'); |
85 SELECT a, typeof(a) FROM t1; | 85 SELECT a, typeof(a) FROM t1; |
86 } | 86 } |
87 } {9.22337203685478e+18 real} | 87 } {9.22337203685478e+18 real} |
88 | 88 |
89 finish_test | 89 finish_test |
OLD | NEW |