No need to return after QSKIP.
QSKIP already causes the test function that calls it to return, so the returns removed by this commit were unreachable. Change-Id: I1fa2f3a3271927d8a600b02d8b31bd81db9146b1 Reviewed-on: http://codereview.qt-project.org/6188 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
924d810dbd
commit
b4de0b1721
@ -253,10 +253,8 @@ void tst_QFontDatabase::addAppFont()
|
||||
QCOMPARE(fontDbChangedSpy.count(), 1);
|
||||
// addApplicationFont is supported on Mac, don't skip the test if it breaks.
|
||||
#ifndef Q_WS_MAC
|
||||
if (id == -1) {
|
||||
if (id == -1)
|
||||
QSKIP("Skip the test since app fonts are not supported on this system", SkipSingle);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
const QStringList addedFamilies = QFontDatabase::applicationFontFamilies(id);
|
||||
|
@ -423,10 +423,8 @@ void tst_QGraphicsEffect::opacity()
|
||||
|
||||
void tst_QGraphicsEffect::grayscale()
|
||||
{
|
||||
if (qApp->desktop()->depth() < 24) {
|
||||
if (qApp->desktop()->depth() < 24)
|
||||
QSKIP("Test only works on 32 bit displays", SkipAll);
|
||||
return;
|
||||
}
|
||||
|
||||
QGraphicsScene scene(0, 0, 100, 100);
|
||||
|
||||
@ -472,10 +470,8 @@ void tst_QGraphicsEffect::grayscale()
|
||||
|
||||
void tst_QGraphicsEffect::colorize()
|
||||
{
|
||||
if (qApp->desktop()->depth() < 24) {
|
||||
if (qApp->desktop()->depth() < 24)
|
||||
QSKIP("Test only works on 32 bit displays", SkipAll);
|
||||
return;
|
||||
}
|
||||
|
||||
QGraphicsScene scene(0, 0, 100, 100);
|
||||
|
||||
|
@ -10519,7 +10519,6 @@ void tst_QGraphicsItem::updateMicroFocus()
|
||||
{
|
||||
#if defined Q_OS_WIN || defined Q_OS_MAC
|
||||
QSKIP("QTBUG-9578", SkipAll);
|
||||
return;
|
||||
#endif
|
||||
QGraphicsScene scene;
|
||||
QWidget parent;
|
||||
|
@ -339,10 +339,8 @@ void tst_QPlainTextEdit::paragSeparatorOnPlaintextAppend()
|
||||
#ifndef QT_NO_CLIPBOARD
|
||||
void tst_QPlainTextEdit::selectAllSetsNotSelection()
|
||||
{
|
||||
if (!QApplication::clipboard()->supportsSelection()) {
|
||||
if (!QApplication::clipboard()->supportsSelection())
|
||||
QSKIP("Test only relevant for systems with selection", SkipAll);
|
||||
return;
|
||||
}
|
||||
|
||||
QApplication::clipboard()->setText(QString("foobar"), QClipboard::Selection);
|
||||
QVERIFY(QApplication::clipboard()->text(QClipboard::Selection) == QString("foobar"));
|
||||
|
@ -71,7 +71,7 @@
|
||||
#define QFAIL_SQL(q, stmt) QVERIFY2(!(q).stmt, tst_Databases::printError((q).lastError(), db))
|
||||
|
||||
#define DBMS_SPECIFIC(db, driver) \
|
||||
if (!db.driverName().startsWith(driver)) { QSKIP(driver " specific test", SkipSingle); return; }
|
||||
if (!db.driverName().startsWith(driver)) { QSKIP(driver " specific test", SkipSingle); }
|
||||
|
||||
// ### use QSystem::hostName if it is integrated in qtest/main
|
||||
static QString qGetHostName()
|
||||
|
@ -571,10 +571,8 @@ void tst_QSqlQuery::oraOutValues()
|
||||
CHECK_DATABASE( db );
|
||||
const QString tst_outValues(qTableName("tst_outValues", __FILE__));
|
||||
|
||||
if ( !db.driver()->hasFeature( QSqlDriver::PreparedQueries ) ) {
|
||||
if ( !db.driver()->hasFeature( QSqlDriver::PreparedQueries ) )
|
||||
QSKIP( "Test requires prepared query support", SkipSingle );
|
||||
return;
|
||||
}
|
||||
|
||||
QSqlQuery q( db );
|
||||
|
||||
@ -755,10 +753,8 @@ void tst_QSqlQuery::outValuesDB2()
|
||||
QSqlDatabase db = QSqlDatabase::database( dbName );
|
||||
CHECK_DATABASE( db );
|
||||
|
||||
if ( !db.driver()->hasFeature( QSqlDriver::PreparedQueries ) ) {
|
||||
if ( !db.driver()->hasFeature( QSqlDriver::PreparedQueries ) )
|
||||
QSKIP( "Test requires prepared query support", SkipSingle );
|
||||
return;
|
||||
}
|
||||
|
||||
QSqlQuery q( db );
|
||||
|
||||
@ -794,10 +790,8 @@ void tst_QSqlQuery::outValues()
|
||||
CHECK_DATABASE( db );
|
||||
const QString tst_outValues(qTableName("tst_outValues", __FILE__));
|
||||
|
||||
if ( !db.driver()->hasFeature( QSqlDriver::PreparedQueries ) ) {
|
||||
if ( !db.driver()->hasFeature( QSqlDriver::PreparedQueries ) )
|
||||
QSKIP( "Test requires prepared query support", SkipSingle );
|
||||
return;
|
||||
}
|
||||
|
||||
QSqlQuery q( db );
|
||||
|
||||
@ -824,10 +818,8 @@ void tst_QSqlQuery::outValues()
|
||||
" set @x = 42\n"
|
||||
"end\n" ) );
|
||||
QVERIFY( q.prepare( "{call " + tst_outValues + "(?)}" ) );
|
||||
} else {
|
||||
} else
|
||||
QSKIP( "Don't know how to create a stored procedure for this database server, please fix this test", SkipSingle );
|
||||
return;
|
||||
}
|
||||
|
||||
q.addBindValue( 0, QSql::Out );
|
||||
|
||||
@ -1600,12 +1592,10 @@ void tst_QSqlQuery::joins()
|
||||
if ( db.driverName().startsWith( "QOCI" )
|
||||
|| db.driverName().startsWith( "QTDS" )
|
||||
|| db.driverName().startsWith( "QODBC" )
|
||||
|| db.driverName().startsWith( "QIBASE" ) ) {
|
||||
|| db.driverName().startsWith( "QIBASE" ) )
|
||||
// Oracle broken beyond recognition - cannot outer join on more than
|
||||
// one table.
|
||||
QSKIP( "DBMS cannot understand standard SQL", SkipSingle );
|
||||
return;
|
||||
}
|
||||
|
||||
QSqlQuery q( db );
|
||||
|
||||
@ -2222,10 +2212,8 @@ void tst_QSqlQuery::bindWithDoubleColonCastOperator()
|
||||
|
||||
// Only PostgreSQL support the double-colon cast operator
|
||||
|
||||
if ( !db.driverName().startsWith( "QPSQL" ) ) {
|
||||
if ( !db.driverName().startsWith( "QPSQL" ) )
|
||||
QSKIP( "Test requires PostgreSQL", SkipSingle );
|
||||
return;
|
||||
}
|
||||
|
||||
const QString tablename(qTableName( "bindtest", __FILE__ ));
|
||||
|
||||
@ -2292,10 +2280,8 @@ void tst_QSqlQuery::createQueryOnClosedDatabase()
|
||||
if ( !db.driverName().startsWith( "QPSQL" )
|
||||
&& !db.driverName().startsWith( "QOCI" )
|
||||
&& !db.driverName().startsWith( "QMYSQL" )
|
||||
&& !db.driverName().startsWith( "QDB2" ) ) {
|
||||
&& !db.driverName().startsWith( "QDB2" ) )
|
||||
QSKIP( "Test is specific for PostgreSQL, Oracle, MySql and DB2", SkipSingle );
|
||||
return;
|
||||
}
|
||||
|
||||
db.close();
|
||||
|
||||
@ -2380,10 +2366,8 @@ void tst_QSqlQuery::sqlite_finish()
|
||||
QFETCH( QString, dbName );
|
||||
QSqlDatabase db = QSqlDatabase::database( dbName );
|
||||
CHECK_DATABASE( db );
|
||||
if (db.driverName() != QLatin1String("QSQLITE")) {
|
||||
if (db.driverName() != QLatin1String("QSQLITE"))
|
||||
QSKIP("Sqlite3 specific test", SkipSingle);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( db.databaseName().startsWith( ':' ) )
|
||||
QSKIP( "This test requires a database on the filesystem, not in-memory", SkipAll );
|
||||
@ -3214,10 +3198,8 @@ void tst_QSqlQuery::sqlite_constraint()
|
||||
QSqlDatabase db = QSqlDatabase::database( dbName );
|
||||
CHECK_DATABASE( db );
|
||||
|
||||
if (db.driverName() != QLatin1String("QSQLITE")) {
|
||||
if (db.driverName() != QLatin1String("QSQLITE"))
|
||||
QSKIP("Sqlite3 specific test", SkipSingle);
|
||||
return;
|
||||
}
|
||||
|
||||
QSqlQuery q(db);
|
||||
const QString trigger(qTableName("test_constraint", __FILE__));
|
||||
|
@ -1449,10 +1449,9 @@ void tst_QSqlRelationalTableModel::psqlSchemaTest()
|
||||
QSqlDatabase db = QSqlDatabase::database(dbName);
|
||||
CHECK_DATABASE(db);
|
||||
|
||||
if(!tst_Databases::isPostgreSQL(db)) {
|
||||
if(!tst_Databases::isPostgreSQL(db))
|
||||
QSKIP("Postgresql specific test", SkipSingle);
|
||||
return;
|
||||
}
|
||||
|
||||
QSqlRelationalTableModel model(0, db);
|
||||
QSqlQuery q(db);
|
||||
QVERIFY_SQL(q, exec("create schema "+qTableName("QTBUG_5373", __FILE__)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user