diff options
author | axis <qt-info@nokia.com> | 2010-03-16 08:47:16 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-03-16 08:47:16 (GMT) |
commit | 815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c (patch) | |
tree | 5d5e3ebc84dd6866a060b0d5416b6db873905e4e /tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp | |
parent | 7ca339be57f1b8dbf9e289fae578c110813eb767 (diff) | |
parent | fdcb62d5d6a3e295273042555d2551eb491a5b2d (diff) | |
download | Qt-815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c.zip Qt-815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c.tar.gz Qt-815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7-s60
Conflicts:
demos/embedded/anomaly/anomaly.pro
demos/embedded/flightinfo/flightinfo.pro
demos/embedded/lightmaps/lightmaps.pro
demos/embedded/weatherinfo/weatherinfo.pro
examples/network/fortuneclient/fortuneclient.pro
examples/network/fortuneserver/fortuneserver.pro
examples/network/network-chat/network-chat.pro
mkspecs/common/symbian/symbian.conf
mkspecs/features/symbian/platform_paths.prf
qmake/generators/symbian/symmake.cpp
qmake/generators/symbian/symmake.h
src/s60installs/s60installs.pro
Diffstat (limited to 'tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp')
-rw-r--r-- | tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp b/tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp index c19f9fd..b69ae79 100644 --- a/tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp +++ b/tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp @@ -111,16 +111,16 @@ void tst_Q3SqlSelectCursor::createTestTables( QSqlDatabase db ) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); // please never ever change this table; otherwise fix all tests ;) if (tst_Databases::isMSAccess(db)) - QVERIFY_SQL(q, exec( "create table " + qTableName( "qtest" ) + " ( id int not null, t_varchar varchar(40) not null," + QVERIFY_SQL(q, exec( "create table " + qTableName( "qtest", __FILE__ ) + " ( id int not null, t_varchar varchar(40) not null," "t_char char(40), t_numeric number, primary key (id, t_varchar) )" )); else - QVERIFY_SQL(q, exec( "create table " + qTableName( "qtest" ) + " ( id int not null, t_varchar varchar(40) not null," + QVERIFY_SQL(q, exec( "create table " + qTableName( "qtest", __FILE__ ) + " ( id int not null, t_varchar varchar(40) not null," "t_char char(40), t_numeric numeric(6, 3), primary key (id, t_varchar) )" )); } void tst_Q3SqlSelectCursor::dropTestTables( QSqlDatabase db ) { - tst_Databases::safeDropTable( db, qTableName( "qtest" ) ); + tst_Databases::safeDropTable( db, qTableName( "qtest", __FILE__ ) ); } void tst_Q3SqlSelectCursor::populateTestTables( QSqlDatabase db ) @@ -129,11 +129,11 @@ void tst_Q3SqlSelectCursor::populateTestTables( QSqlDatabase db ) return; QSqlQuery q( db ); - q.exec( "delete from " + qTableName( "qtest" ) ); //non-fatal - QVERIFY_SQL(q, exec( "insert into " + qTableName( "qtest" ) + " (id, t_varchar, t_char, t_numeric) values ( 0, 'VarChar0', 'Char0', 1.1 )" )); - QVERIFY_SQL(q, exec( "insert into " + qTableName( "qtest" ) + " (id, t_varchar, t_char, t_numeric) values ( 1, 'VarChar1', 'Char1', 2.2 )" )); - QVERIFY_SQL(q, exec( "insert into " + qTableName( "qtest" ) + " (id, t_varchar, t_char, t_numeric) values ( 2, 'VarChar2', 'Char2', 3.3 )" )); - QVERIFY_SQL(q, exec( "insert into " + qTableName( "qtest" ) + " (id, t_varchar, t_char, t_numeric) values ( 3, 'VarChar3', 'Char3', 4.4 )" )); + q.exec( "delete from " + qTableName( "qtest", __FILE__ ) ); //non-fatal + QVERIFY_SQL(q, exec( "insert into " + qTableName( "qtest", __FILE__ ) + " (id, t_varchar, t_char, t_numeric) values ( 0, 'VarChar0', 'Char0', 1.1 )" )); + QVERIFY_SQL(q, exec( "insert into " + qTableName( "qtest", __FILE__ ) + " (id, t_varchar, t_char, t_numeric) values ( 1, 'VarChar1', 'Char1', 2.2 )" )); + QVERIFY_SQL(q, exec( "insert into " + qTableName( "qtest", __FILE__ ) + " (id, t_varchar, t_char, t_numeric) values ( 2, 'VarChar2', 'Char2', 3.3 )" )); + QVERIFY_SQL(q, exec( "insert into " + qTableName( "qtest", __FILE__ ) + " (id, t_varchar, t_char, t_numeric) values ( 3, 'VarChar3', 'Char3', 4.4 )" )); } void tst_Q3SqlSelectCursor::initTestCase() @@ -184,7 +184,7 @@ void tst_Q3SqlSelectCursor::value() QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - Q3SqlSelectCursor cur( "select * from " + qTableName( "qtest" ) + " order by id", db ); + Q3SqlSelectCursor cur( "select * from " + qTableName( "qtest", __FILE__ ) + " order by id", db ); QVERIFY( cur.select() ); QVERIFY_SQL(cur, isActive()); int i = 0; @@ -203,7 +203,7 @@ void tst_Q3SqlSelectCursor::_exec() Q3SqlSelectCursor cur( QString(), db ); QVERIFY_SQL(cur, isActive() == false); - cur.exec( "select * from " + qTableName( "qtest" ) ); //nothing should happen + cur.exec( "select * from " + qTableName( "qtest", __FILE__ ) ); //nothing should happen QVERIFY_SQL(cur, isActive()); int i = 0; while ( cur.next() ) { |