SQLite

Check-in [3daf7cae18]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a test case so that it (hopefully) works on x86-64. Ticket #2465. (CVS 4134)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3daf7cae18ae2ee6404f770e69e4cd0c715615e5
User & Date: drh 2007-06-26 22:42:56.000
Context
2007-06-26
22:55
Make sure the TCL bindings always use Tcl_GetWideIntFromObj() even if the reported type is "int" because on x86-64 and "int" type is 64-bits. Ticket #2465. (CVS 4135) (check-in: 5c93324b93 user: drh tags: trunk)
22:42
Fix a test case so that it (hopefully) works on x86-64. Ticket #2465. (CVS 4134) (check-in: 3daf7cae18 user: drh tags: trunk)
22:10
Remove vestigal code from Makefile.linux-gcc. Ticket #2466. (CVS 4133) (check-in: 338c187910 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/types3.test.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32


33
34
35
36






37
38
39
40
41
42
43
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library. The focus
# of this file is testing the interaction of SQLite manifest types
# with Tcl dual-representations.
#
# $Id: types3.test,v 1.6 2007/05/03 16:31:26 danielk1977 Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# A variable with only a string representation comes in as TEXT
do_test types3-1.1 {
  set V {}
  append V {}
  concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}]
} {string text}

# A variable with an integer representation comes in as INTEGER
do_test types3-1.2 {
  set V [expr {int(1+2)}]
  concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}]
} {int integer}


do_test types3-1.3 {
  set V [expr {1+123456789012345}]
  concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}]
} {wideInt integer}







# A double variable comes in as REAL
do_test types3-1.4 {
  set V [expr {1.0+1}]
  concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}]
} {double real}








|

















>
>
|
|
|
|
>
>
>
>
>
>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library. The focus
# of this file is testing the interaction of SQLite manifest types
# with Tcl dual-representations.
#
# $Id: types3.test,v 1.7 2007/06/26 22:42:56 drh Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# A variable with only a string representation comes in as TEXT
do_test types3-1.1 {
  set V {}
  append V {}
  concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}]
} {string text}

# A variable with an integer representation comes in as INTEGER
do_test types3-1.2 {
  set V [expr {int(1+2)}]
  concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}]
} {int integer}
set V [expr {1+12345678012345}]
if {[tcl_variable_type V]=="wideInt"} {
  do_test types3-1.3 {
    set V [expr {1+123456789012345}]
    concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}]
  } {wideInt integer}
} else {
  do_test types3-1.3 {
    set V [expr {1+123456789012345}]
    concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}]
  } {int integer}
}

# A double variable comes in as REAL
do_test types3-1.4 {
  set V [expr {1.0+1}]
  concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}]
} {double real}