summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-09-30 12:57:57 +0200
committerLiang Qi <liang.qi@qt.io>2019-09-30 20:07:25 +0200
commit6f9a215cc4c4fa87e5692174dd728b521513ecd2 (patch)
tree0f8d079536bdfbcd9f8c1c7213bb8a21945edd07 /tests/auto/gui
parent4bd6cd1992fdcdc933861ba646ea9da870670237 (diff)
parent99cdd5fc67386fb3361299b9ec493e081043097d (diff)
Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/BLACKLIST6
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro2
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp21
3 files changed, 27 insertions, 2 deletions
diff --git a/tests/auto/gui/kernel/qopenglwindow/BLACKLIST b/tests/auto/gui/kernel/qopenglwindow/BLACKLIST
new file mode 100644
index 0000000000..3ce78abee8
--- /dev/null
+++ b/tests/auto/gui/kernel/qopenglwindow/BLACKLIST
@@ -0,0 +1,6 @@
+[basic]
+winrt
+[resize]
+winrt
+[painter]
+winrt
diff --git a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
index d09af5084b..759b608c93 100644
--- a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
+++ b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
@@ -4,5 +4,3 @@ TARGET = tst_qopenglwindow
QT += core-private gui-private testlib
SOURCES += tst_qopenglwindow.cpp
-
-win32:CONFIG+=insignificant_test # QTBUG-46452, QTBUG-49630
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index 1ee9105cd2..d722856366 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -66,6 +66,8 @@ private slots:
void defaultFamily();
void toAndFromString();
void fromStringWithoutStyleName();
+ void fromDegenerateString_data();
+ void fromDegenerateString();
void sharing();
void familyNameWithCommaQuote_data();
@@ -604,6 +606,25 @@ void tst_QFont::fromStringWithoutStyleName()
QCOMPARE(font2.toString(), str);
}
+void tst_QFont::fromDegenerateString_data()
+{
+ QTest::addColumn<QString>("string");
+
+ QTest::newRow("empty") << QString();
+ QTest::newRow("justAComma") << ",";
+ QTest::newRow("commasAndSpaces") << " , , ";
+ QTest::newRow("spaces") << " ";
+ QTest::newRow("spacesTabsAndNewlines") << " \t \n";
+}
+
+void tst_QFont::fromDegenerateString()
+{
+ QFETCH(QString, string);
+ QFont f;
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression(".*Invalid description.*"));
+ QCOMPARE(f.fromString(string), false);
+ QCOMPARE(f, QFont());
+}
void tst_QFont::sharing()
{