From 34ef939b25666de83d859a0eb814d8ebe94d04e2 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 9 Jan 2012 12:55:52 +1000 Subject: Fix failing tst_QQuickPathView::undefinedPath() Test was failing on Mac because QPainterPath only prints the relevant warnings if QT_NO_DEBUG is not defined, which is not the case for standard builds on Mac. Task-number: QTBUG-23482 Change-Id: Ied4d263a1ce7503b573ecc3c53787dac2b57cc74 Reviewed-by: Rohan McGovern --- tests/auto/qtquick2/qquickpathview/tst_qquickpathview.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/auto/qtquick2/qquickpathview/tst_qquickpathview.cpp b/tests/auto/qtquick2/qquickpathview/tst_qquickpathview.cpp index 8e602c7a90..2d6293c6e8 100644 --- a/tests/auto/qtquick2/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/qtquick2/qquickpathview/tst_qquickpathview.cpp @@ -1288,17 +1288,16 @@ void tst_QQuickPathView::visualDataModel() void tst_QQuickPathView::undefinedPath() { -#ifdef Q_OS_MAC - QSKIP("QTBUG-23482"); -#endif - QDeclarativeEngine engine; - QString warning1("QPainterPath::moveTo: Adding point where x or y is NaN or Inf, ignoring call"); - QTest::ignoreMessage(QtWarningMsg,qPrintable(warning1)); + // QPainterPath warnings are only received if QT_NO_DEBUG is not defined + if (QLibraryInfo::isDebugBuild()) { + QString warning1("QPainterPath::moveTo: Adding point where x or y is NaN or Inf, ignoring call"); + QTest::ignoreMessage(QtWarningMsg,qPrintable(warning1)); - QString warning2("QPainterPath::lineTo: Adding point where x or y is NaN or Inf, ignoring call"); - QTest::ignoreMessage(QtWarningMsg,qPrintable(warning2)); + QString warning2("QPainterPath::lineTo: Adding point where x or y is NaN or Inf, ignoring call"); + QTest::ignoreMessage(QtWarningMsg,qPrintable(warning2)); + } QDeclarativeComponent c(&engine, testFileUrl("undefinedpath.qml")); -- cgit v1.2.3