Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Side by Side Diff: third_party/sqlite/src/test/fkey4.test

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # 2011 Feb 04 1 # 2011 Feb 04
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 24 matching lines...) Expand all
35 INSERT INTO t2 VALUES(1,3); 35 INSERT INTO t2 VALUES(1,3);
36 } 36 }
37 } {} 37 } {}
38 38
39 do_test fkey4-1.2 { 39 do_test fkey4-1.2 {
40 set ::DB [sqlite3_connection_pointer db] 40 set ::DB [sqlite3_connection_pointer db]
41 set ::SQL {INSERT INTO t2 VALUES(2,4)} 41 set ::SQL {INSERT INTO t2 VALUES(2,4)}
42 set ::STMT1 [sqlite3_prepare_v2 $::DB $::SQL -1 TAIL] 42 set ::STMT1 [sqlite3_prepare_v2 $::DB $::SQL -1 TAIL]
43 sqlite3_step $::STMT1 43 sqlite3_step $::STMT1
44 } {SQLITE_CONSTRAINT} 44 } {SQLITE_CONSTRAINT}
45 verify_ex_errcode fkey4-1.2b SQLITE_CONSTRAINT_FOREIGNKEY
45 do_test fkey4-1.3 { 46 do_test fkey4-1.3 {
46 set ::STMT2 [sqlite3_prepare_v2 $::DB $::SQL -1 TAIL] 47 set ::STMT2 [sqlite3_prepare_v2 $::DB $::SQL -1 TAIL]
47 sqlite3_step $::STMT2 48 sqlite3_step $::STMT2
48 } {SQLITE_CONSTRAINT} 49 } {SQLITE_CONSTRAINT}
50 verify_ex_errcode fkey4-1.3b SQLITE_CONSTRAINT_FOREIGNKEY
49 do_test fkey4-1.4 { 51 do_test fkey4-1.4 {
50 db eval {SELECT * FROM t2} 52 db eval {SELECT * FROM t2}
51 } {1 3} 53 } {1 3}
52 sqlite3_finalize $::STMT1 54 sqlite3_finalize $::STMT1
53 sqlite3_finalize $::STMT2 55 sqlite3_finalize $::STMT2
54 56
55 finish_test 57 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698