diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp index 88b4abe2e3..7564e3fc1f 100644 --- a/tests/auto/corelib/io/largefile/tst_largefile.cpp +++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp @@ -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" diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp index bd7bd3a464..493d7e20c5 100644 --- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp @@ -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("string"); QTest::addColumn("key"); QTest::addColumn("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() {