summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfont/tst_qfont.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qfont/tst_qfont.cpp')
-rw-r--r--tests/auto/qfont/tst_qfont.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qfont/tst_qfont.cpp b/tests/auto/qfont/tst_qfont.cpp
index cfafa78684..711ffc0b53 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"