/ Check-in [a3cc027f]
Login

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

Overview
Comment:Enhancements to the hex literal tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | hex-literal
Files: files | file ages | folders
SHA1: a3cc027fa7ca41da23ecd0770a075a48416af020
User & Date: mistachkin 2014-07-23 19:04:25
Context
2014-07-24
12:19
Add support for hexadecimal integer literals in the parser. check-in: f8f79f28 user: drh tags: trunk
2014-07-23
19:04
Enhancements to the hex literal tests. Closed-Leaf check-in: a3cc027f user: mistachkin tags: hex-literal
14:52
Remove a surplus function prototype. #ifdef code that is not used when hex integers are omitted at compile time. check-in: a5b383e0 user: drh tags: hex-literal
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/hexlit.test.

    80     80   hexlit1 157 0x200000000000000 144115188075855872
    81     81   hexlit1 158 0x400000000000000 288230376151711744
    82     82   hexlit1 159 0x800000000000000 576460752303423488
    83     83   hexlit1 160 0X1000000000000000 1152921504606846976
    84     84   hexlit1 161 0x2000000000000000 2305843009213693952
    85     85   hexlit1 162 0X4000000000000000 4611686018427387904
    86     86   hexlit1 163 0x8000000000000000 -9223372036854775808
           87  +hexlit1 164 0XFFFFFFFFFFFFFFFF -1
    87     88   
    88         -hexlit1 200 0x001 1
    89         -hexlit1 201 0X002 2
    90         -hexlit1 202 0x003 3
    91         -hexlit1 203 0X004 4
    92         -hexlit1 204 0x005 5
    93         -hexlit1 205 0X006 6
    94         -hexlit1 206 0x007 7
    95         -hexlit1 207 0X008 8
    96         -hexlit1 208 0x009 9
    97         -hexlit1 209 0x00a 10
    98         -hexlit1 210 0x00A 10
    99         -hexlit1 211 0x00b 11
   100         -hexlit1 212 0x00B 11
   101         -hexlit1 213 0x00c 12
   102         -hexlit1 214 0x00C 12
   103         -hexlit1 215 0x00d 13
   104         -hexlit1 216 0x00D 13
   105         -hexlit1 217 0x00e 14
   106         -hexlit1 218 0x00E 14 
   107         -hexlit1 219 0x00f 15
   108         -hexlit1 220 0x00F 15
           89  +for {set n 1} {$n < 0x10} {incr n} {
           90  +  hexlit1 200.$n.1 0X[format %03X $n] $n
           91  +  hexlit1 200.$n.2 0x[format %03X $n] $n
           92  +  hexlit1 200.$n.3 0X[format %03x $n] $n
           93  +  hexlit1 200.$n.4 0x[format %03x $n] $n
           94  +}
   109     95   
   110     96   # String literals that look like hex do not get cast or coerced.
   111     97   #
   112     98   do_execsql_test hexlit-300 {
   113     99     CREATE TABLE t1(x INT, y REAL);
   114    100     INSERT INTO t1 VALUES('1234','4567'),('0x1234','0x4567');
   115    101     SELECT typeof(x), x, typeof(y), y, '#' FROM t1 ORDER BY rowid;