diff options
author | Bill King <bill.king@nokia.com> | 2009-04-01 04:09:00 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-04-01 04:09:00 (GMT) |
commit | 831d2742b7c41924f052acd81620e8bfc58afde7 (patch) | |
tree | f85e0b0749f934ba0955a85ec89eebfa37a345e9 /tests/auto/q3sqlselectcursor | |
parent | ba8c15b71b006ddb5c74f0c97288d98541221328 (diff) | |
download | Qt-831d2742b7c41924f052acd81620e8bfc58afde7.zip Qt-831d2742b7c41924f052acd81620e8bfc58afde7.tar.gz Qt-831d2742b7c41924f052acd81620e8bfc58afde7.tar.bz2 |
DB Autotest cleanup
Make db autotest data set generation more consistent, slightly faster.
Also, add ability to easily generate a set of a single databases
entries worth of criteria to test.
Diffstat (limited to 'tests/auto/q3sqlselectcursor')
-rw-r--r-- | tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp b/tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp index a8c5940..9ab74f0 100644 --- a/tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp +++ b/tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp @@ -76,7 +76,7 @@ private slots: void _exec(); private: - void generic_data(); + void generic_data(const QString &engine=QString()); void createTestTables( QSqlDatabase db ); void dropTestTables( QSqlDatabase db ); void populateTestTables( QSqlDatabase db ); @@ -92,10 +92,14 @@ tst_Q3SqlSelectCursor::~tst_Q3SqlSelectCursor() { } -void tst_Q3SqlSelectCursor::generic_data() +void tst_Q3SqlSelectCursor::generic_data(const QString& engine) { - if ( dbs.fillTestTable() == 0 ) - QSKIP( "No database drivers are available in this Qt configuration", SkipAll ); + if ( dbs.fillTestTable(engine) == 0 ) { + if(engine.isEmpty()) + QSKIP( "No database drivers are available in this Qt configuration", SkipAll ); + else + QSKIP( (QString("No database drivers of type %1 are available in this Qt configuration").arg(engine)).toLocal8Bit(), SkipAll ); + } } void tst_Q3SqlSelectCursor::createTestTables( QSqlDatabase db ) |