1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add test cases to improve coverage of VDBE branches. Still some to go.

FossilOrigin-Name: 4cef609d61de272cfdc2b39e1d49c7cd56ec834086bd63095116ff98f4d402bd
This commit is contained in:
dan
2019-04-04 17:58:34 +00:00
parent 80ac9cb3c0
commit b84b38fd89
8 changed files with 198 additions and 13 deletions

View File

@ -16,6 +16,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix autoinc
# If the library is not compiled with autoincrement support then
# skip all tests in this file.
@ -856,4 +857,27 @@ do_test autoinc-12.7 {
lappend res $msg
} {0 ok}
#--------------------------------------------------------------------------
reset_db
do_execsql_test 13.0 {
CREATE TABLE t1(i INTEGER PRIMARY KEY AUTOINCREMENT, j);
CREATE TABLE t2(i INTEGER PRIMARY KEY AUTOINCREMENT, j);
CREATE TABLE t3(i INTEGER PRIMARY KEY AUTOINCREMENT, j);
INSERT INTO t1 VALUES(NULL, 1);
INSERT INTO t2 VALUES(NULL, 2);
INSERT INTO t3 VALUES(NULL, 3);
SELECT name FROM sqlite_sequence;
} {t1 t2 t3}
do_execsql_test 13.1 {
UPDATE sqlite_sequence SET name=NULL WHERE name='t2';
INSERT INTO t3 VALUES(NULL, 4);
DELETE FROM t3;
INSERT INTO t3 VALUES(NULL, 5);
SELECT * FROM t3;
} {3 5}
finish_test