Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Some extra tests for the OP_MustBeInt opcode. (CVS 1769) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
b9d5858ca171e11afaeb9712efa0fc1a |
User & Date: | drh 2004-06-30 02:29:03.000 |
Context
2004-06-30
| ||
02:35 | Minor fixes for UTF-16 databases. (CVS 1770) (check-in: 6c5c11e07e user: danielk1977 tags: trunk) | |
02:29 | Some extra tests for the OP_MustBeInt opcode. (CVS 1769) (check-in: b9d5858ca1 user: drh tags: trunk) | |
01:07 | Remove some pointless asserts from btree.c. (CVS 1768) (check-in: 73eec67505 user: drh tags: trunk) | |
Changes
Changes to test/intpkey.test.
︙ | ︙ | |||
9 10 11 12 13 14 15 | # #*********************************************************************** # This file implements regression tests for SQLite library. # # This file implements tests for the special processing associated # with INTEGER PRIMARY KEY columns. # | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # #*********************************************************************** # This file implements regression tests for SQLite library. # # This file implements tests for the special processing associated # with INTEGER PRIMARY KEY columns. # # $Id: intpkey.test,v 1.17 2004/06/30 02:29:03 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Create a table with a primary key and a datatype other than # integer # |
︙ | ︙ | |||
481 482 483 484 485 486 487 488 489 | do_test intpkey-11.1 { execsql { SELECT b FROM t1 WHERE a=2.0+3.5; } } {} integrity_check intpkey-12.1 finish_test | > > > > > > > > > > > > > > > > > > > > > > > > > > > | 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | do_test intpkey-11.1 { execsql { SELECT b FROM t1 WHERE a=2.0+3.5; } } {} integrity_check intpkey-12.1 # Try to use a string that looks like a floating point number as # an integer primary key. This should actually work when the floating # point value can be rounded to an integer without loss of data. # do_test intpkey-13.1 { execsql { SELECT * FROM t1 WHERE a=1; } } {} do_test intpkey-13.2 { execsql { INSERT INTO t1 VALUES('1.0',2,3); SELECT * FROM t1 WHERE a=1; } } {1 2 3} do_test intpkey-13.3 { catchsql { INSERT INTO t1 VALUES('1.5',3,4); } } {1 {datatype mismatch}} do_test intpkey-13.4 { catchsql { INSERT INTO t1 VALUES(x'123456',3,4); } } {1 {datatype mismatch}} finish_test |