On 09/12/2010 17:52, David Faure wrote:
On Tuesday 07 December 2010, Jaime wrote:
Hi,

   I've run the kdelibs with the environment variable QT_FATAL_WARNINGS=1,
and the number of failed tests has grown in a noticeable way. (also with 2
crashes).

   I guess that less Qt warnings usually means less unexpected crashes.
   Therefore I suggest to add that variable to the test target, and if it is
possible, to fix the failed unittests before 4.6.0 is released.

I disagree that this makes sense.

$ ./kconfigguitest
********* Start testing of KConfigTest *********
Config: Using QTest library 4.7.0, Qt 4.7.0
PASS   : KConfigTest::initTestCase()
PASS   : KConfigTest::testComplex()
QWARN  : KConfigTest::testInvalid() QColor::setNamedColor: Unknown color name
'1'

Yes, this will crash with QT_FATAL_WARNINGS. So? It's good to have a unit test
test border conditions too, even if these conditions lead to warnings from Qt.

One could try to use QTest::ignoreMessage() [1] to skip expected error messages.

[1] http://doc.qt.nokia.com/4.7/qtest.html#ignoreMessage

Reply via email to