On 10/12/2010 00:44, David Faure wrote:
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.
Does not help. It removes the above QWARN line when running the test normally,
but with QT_FATAL_WARNING the call to qWarning will still abort immediately.
Wrong layer.
Too bad. I like the idea of warn-free unit-tests, but sometimes
outputting warning is the correct behavior.
Aurélien