From ff3950866c0f756a5b6f379b9f95f01fff4a9ec7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 24 Aug 2011 17:13:55 +0200 Subject: Make tests use unique table prefixes --- sqlite/native/driver.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'sqlite/native/driver.cxx') diff --git a/sqlite/native/driver.cxx b/sqlite/native/driver.cxx index 73e0450..7f1d319 100644 --- a/sqlite/native/driver.cxx +++ b/sqlite/native/driver.cxx @@ -30,8 +30,8 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - db->execute ("DROP TABLE IF EXISTS test"); - db->execute ("CREATE TABLE test (n INTEGER PRIMARY KEY)"); + db->execute ("DROP TABLE IF EXISTS sqlitex_native_test"); + db->execute ("CREATE TABLE sqlitex_native_test (n INTEGER PRIMARY KEY)"); t.commit (); } @@ -41,8 +41,11 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - assert (db->execute ("INSERT INTO test (n) VALUES (1)") == 1); - assert (db->execute ("INSERT INTO test (n) VALUES (2)") == 1); + assert ( + db->execute ("INSERT INTO sqlitex_native_test (n) VALUES (1)") == 1); + + assert ( + db->execute ("INSERT INTO sqlitex_native_test (n) VALUES (2)") == 1); t.commit (); } @@ -52,8 +55,11 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - assert (db->execute ("SELECT n FROM test WHERE n < 3") == 2); - assert (db->execute ("SELECT n FROM test WHERE n > 3") == 0); + assert ( + db->execute ("SELECT n FROM sqlitex_native_test WHERE n < 3") == 2); + + assert ( + db->execute ("SELECT n FROM sqlitex_native_test WHERE n > 3") == 0); t.commit (); } -- cgit v1.1