diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-04-18 07:51:13 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-04-18 08:02:20 (GMT) |
commit | 5a35876226939167f664b826807d511a81167b24 (patch) | |
tree | cc98ea4f71098bad118e01279bff5c00fef9a15b /tests/auto | |
parent | 1348f4f0853155182d2ea5836902794d1e43980c (diff) | |
download | Qt-5a35876226939167f664b826807d511a81167b24.zip Qt-5a35876226939167f664b826807d511a81167b24.tar.gz Qt-5a35876226939167f664b826807d511a81167b24.tar.bz2 |
Make sure #ifdef'd tests still have main() function
Otherwise it won't link on QWS
Reviewed-by: TrustMe
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qglyphs/tst_qglyphs.cpp | 10 | ||||
-rw-r--r-- | tests/auto/qrawfont/tst_qrawfont.cpp | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/tests/auto/qglyphs/tst_qglyphs.cpp b/tests/auto/qglyphs/tst_qglyphs.cpp index a9ae556..ffa0d00 100644 --- a/tests/auto/qglyphs/tst_qglyphs.cpp +++ b/tests/auto/qglyphs/tst_qglyphs.cpp @@ -46,14 +46,13 @@ #include <qtextlayout.h> #include <qfontdatabase.h> -#if !defined(QT_NO_RAWFONT) - // #define DEBUG_SAVE_IMAGE class tst_QGlyphs: public QObject { Q_OBJECT +#if !defined(QT_NO_RAWFONT) private slots: void initTestCase(); void cleanupTestCase(); @@ -77,8 +76,12 @@ private slots: private: int m_testFontId; QFont m_testFont; +#endif // QT_NO_RAWFONT + }; +#if !defined(QT_NO_RAWFONT) + Q_DECLARE_METATYPE(QGlyphs); void tst_QGlyphs::initTestCase() @@ -572,7 +575,8 @@ void tst_QGlyphs::drawRightToLeft() } +#endif // QT_NO_RAWFONT + QTEST_MAIN(tst_QGlyphs) #include "tst_qglyphs.moc" -#endif // QT_NO_RAWFONT diff --git a/tests/auto/qrawfont/tst_qrawfont.cpp b/tests/auto/qrawfont/tst_qrawfont.cpp index c20b41d..3aa4006 100644 --- a/tests/auto/qrawfont/tst_qrawfont.cpp +++ b/tests/auto/qrawfont/tst_qrawfont.cpp @@ -44,12 +44,11 @@ #include <qrawfont.h> #include <private/qrawfont_p.h> -#if !defined(QT_NO_RAWFONT) - class tst_QRawFont: public QObject { Q_OBJECT +#if !defined(QT_NO_RAWFONT) private slots: void invalidRawFont(); @@ -92,8 +91,10 @@ private slots: void unsupportedWritingSystem_data(); void unsupportedWritingSystem(); +#endif // QT_NO_RAWFONT }; +#if !defined(QT_NO_RAWFONT) Q_DECLARE_METATYPE(QFont::HintingPreference) Q_DECLARE_METATYPE(QFont::Style) Q_DECLARE_METATYPE(QFont::Weight) @@ -806,7 +807,8 @@ void tst_QRawFont::unsupportedWritingSystem() fontDatabase.removeApplicationFont(id); } +#endif // QT_NO_RAWFONT + QTEST_MAIN(tst_QRawFont) #include "tst_qrawfont.moc" -#endif // QT_NO_RAWFONT |