Remove #ifdef from outside test functions
It's usually a bad idea to surround slots or signals with #ifdef since moc may not parse it the same way the compiler does. Change-Id: I6a3623ed7cb9fbc1b966df9d60f71b7fdf91acfe Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
e1f89037c3
commit
9598448758
@ -121,9 +121,7 @@ private slots:
|
||||
|
||||
// Map/unmap large file
|
||||
void mapFile();
|
||||
#ifndef Q_OS_MAC
|
||||
void mapOffsetOverflow();
|
||||
#endif
|
||||
|
||||
void closeFile() { largeFile.close(); }
|
||||
|
||||
@ -513,9 +511,9 @@ void tst_LargeFile::mapFile()
|
||||
}
|
||||
|
||||
//Mac: memory-mapping beyond EOF may succeed but it could generate bus error on access
|
||||
#ifndef Q_OS_MAC
|
||||
void tst_LargeFile::mapOffsetOverflow()
|
||||
{
|
||||
#ifndef Q_OS_MAC
|
||||
// Out-of-range mappings should fail, and not silently clip the offset
|
||||
for (int i = 50; i < 63; ++i) {
|
||||
uchar *address = 0;
|
||||
@ -529,8 +527,8 @@ void tst_LargeFile::mapOffsetOverflow()
|
||||
address = largeFile.map(((qint64)1 << i) + blockSize, blockSize);
|
||||
QVERIFY( !address );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
QTEST_APPLESS_MAIN(tst_LargeFile)
|
||||
#include "tst_largefile.moc"
|
||||
|
@ -120,10 +120,8 @@ private slots:
|
||||
void symetricConstructors();
|
||||
void checkMultipleNames();
|
||||
void checkMultipleCodes();
|
||||
#ifndef Q_OS_MAC
|
||||
void mnemonic_data();
|
||||
void mnemonic();
|
||||
#endif
|
||||
void toString_data();
|
||||
void toString();
|
||||
void toStringFromKeycode_data();
|
||||
@ -144,10 +142,8 @@ private slots:
|
||||
void standardKeys_data();
|
||||
void standardKeys();
|
||||
void keyBindings();
|
||||
#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
|
||||
void translated_data();
|
||||
void translated();
|
||||
#endif
|
||||
void i18nKeys_data();
|
||||
void i18nKeys();
|
||||
|
||||
@ -405,9 +401,11 @@ void tst_QKeySequence::keyBindings()
|
||||
QCOMPARE(bindings, expected);
|
||||
}
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
void tst_QKeySequence::mnemonic_data()
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
QSKIP("Test not applicable to Mac OS X");
|
||||
#endif
|
||||
QTest::addColumn<QString>("string");
|
||||
QTest::addColumn<QString>("key");
|
||||
QTest::addColumn<bool>("warning");
|
||||
@ -427,6 +425,7 @@ void tst_QKeySequence::mnemonic_data()
|
||||
|
||||
void tst_QKeySequence::mnemonic()
|
||||
{
|
||||
#ifndef Q_OS_MAC
|
||||
QFETCH(QString, string);
|
||||
QFETCH(QString, key);
|
||||
QFETCH(bool, warning);
|
||||
@ -444,8 +443,8 @@ void tst_QKeySequence::mnemonic()
|
||||
QKeySequence res = QKeySequence(key);
|
||||
|
||||
QCOMPARE(seq, res);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QKeySequence::toString_data()
|
||||
{
|
||||
@ -734,9 +733,12 @@ void tst_QKeySequence::listFromString()
|
||||
QCOMPARE(QKeySequence::listFromString(strSequences), sequences);
|
||||
}
|
||||
|
||||
#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
|
||||
void tst_QKeySequence::translated_data()
|
||||
{
|
||||
#if defined (Q_OS_MAC) || defined (Q_OS_WINCE)
|
||||
QSKIP("Test not applicable");
|
||||
#endif
|
||||
|
||||
qApp->installTranslator(ourTranslator);
|
||||
qApp->installTranslator(qtTranslator);
|
||||
|
||||
@ -764,6 +766,7 @@ void tst_QKeySequence::translated_data()
|
||||
|
||||
void tst_QKeySequence::translated()
|
||||
{
|
||||
#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
|
||||
QFETCH(QString, transKey);
|
||||
QFETCH(QString, compKey);
|
||||
|
||||
@ -775,8 +778,8 @@ void tst_QKeySequence::translated()
|
||||
|
||||
qApp->removeTranslator(ourTranslator);
|
||||
qApp->removeTranslator(qtTranslator);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QKeySequence::i18nKeys_data()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user