Fix error in qcssparser autotest.

QTest::ignoreMessage() cannot be called when creating test data rows,
but rather must be called when executing a row.

Change-Id: Ifceaff4c5a7f1b6408ec57196298e3f3038910c9
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2012-02-07 14:16:21 +10:00 committed by Qt by Nokia
parent 4a1f1b9be0
commit cfd8a9a448

View File

@ -344,7 +344,6 @@ void tst_QCssParser::term_data()
val.variant = QVariant(QColor("#ffbb00"));
QTest::newRow("hexcolor2") << true << "#fb0" << val;
QTest::ignoreMessage(QtWarningMsg, "QCssParser::parseHexColor: Unknown color name '#cafebabe'");
QTest::newRow("hexcolor_failure") << false << "#cafebabe" << val;
val.type = QCss::Value::Uri;
@ -368,6 +367,9 @@ void tst_QCssParser::term()
QFETCH(QString, css);
QFETCH(QCss::Value, expectedValue);
if (strcmp(QTest::currentDataTag(), "hexcolor_failure") == 0)
QTest::ignoreMessage(QtWarningMsg, "QCssParser::parseHexColor: Unknown color name '#cafebabe'");
QCss::Parser parser(css);
QCss::Value val;
QVERIFY(parser.testTerm());