diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-06-20 14:29:07 (GMT) |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-06-20 14:29:07 (GMT) |
commit | f01f35dc98547fdfe90a6fa5de17d1a842bb38f5 (patch) | |
tree | 9f9655cc42c8a02c354d9f4a3c53c29ed150a0ae /tests/auto/qfont/tst_qfont.cpp | |
parent | bdc901a419616c71558b48f57c4659adbd1b6f4b (diff) | |
parent | c390312f8fbea14ac4df0c5185ca814054f448d8 (diff) | |
download | Qt-f01f35dc98547fdfe90a6fa5de17d1a842bb38f5.zip Qt-f01f35dc98547fdfe90a6fa5de17d1a842bb38f5.tar.gz Qt-f01f35dc98547fdfe90a6fa5de17d1a842bb38f5.tar.bz2 |
Merge remote-tracking branch 'upstream/4.8'
Diffstat (limited to 'tests/auto/qfont/tst_qfont.cpp')
-rw-r--r-- | tests/auto/qfont/tst_qfont.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qfont/tst_qfont.cpp b/tests/auto/qfont/tst_qfont.cpp index cfafa78..711ffc0 100644 --- a/tests/auto/qfont/tst_qfont.cpp +++ b/tests/auto/qfont/tst_qfont.cpp @@ -77,6 +77,7 @@ private slots: void insertAndRemoveSubstitutions(); void serializeSpacing(); void lastResortFont(); + void styleName(); }; // Testing get/set functions @@ -612,5 +613,17 @@ void tst_QFont::lastResortFont() QVERIFY(!font.lastResortFont().isEmpty()); } +void tst_QFont::styleName() +{ +#if !defined(Q_WS_MAC) + QSKIP("Only tested on Mac", SkipAll); +#else + QFont font("Helvetica Neue"); + font.setStyleName("UltraLight"); + + QCOMPARE(QFontInfo(font).styleName(), QString("UltraLight")); +#endif +} + QTEST_MAIN(tst_QFont) #include "tst_qfont.moc" |