Skip to content

Commit 12bb1f7

Browse files
committed
testqgsogcutils.cpp: add more debug output to diagnose flake failure on QT5
1 parent 76bf6e0 commit 12bb1f7

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

tests/src/core/testqgsogcutils.cpp

+18-2
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,15 @@ void TestQgsOgcUtils::testExpressionToOgcFilterWFS20()
462462
qDebug( "SRSNAME: %s", srsName.toAscii().data() );
463463
qDebug( "OGC : %s", doc.toString( -1 ).toAscii().data() );
464464

465-
QCOMPARE( normalizeXML( xmlText ), normalizeXML( doc.toString( -1 ) ) );
465+
QString normalizedExpected( normalizeXML( xmlText ) );
466+
QString normalizedGot( normalizeXML( doc.toString( -1 ) ) );
467+
468+
if ( normalizedExpected != normalizedGot )
469+
{
470+
qDebug( "Normalized expected: %s", normalizedExpected.toAscii().data() );
471+
qDebug( "Normalized got: %s", normalizedGot.toAscii().data() );
472+
}
473+
QCOMPARE( normalizedExpected, normalizedGot );
466474
}
467475

468476
void TestQgsOgcUtils::testExpressionToOgcFilterWFS20_data()
@@ -562,7 +570,15 @@ void TestQgsOgcUtils::testSQLStatementToOgcFilter()
562570
filterVersion == QgsOgcUtils::FILTER_FES_2_0 ? "FES 2.0" : "unknown" );
563571
qDebug( "OGC : %s", doc.toString( -1 ).toAscii().data() );
564572

565-
QCOMPARE( normalizeXML( xmlText ), normalizeXML( doc.toString( -1 ) ) );
573+
QString normalizedExpected( normalizeXML( xmlText ) );
574+
QString normalizedGot( normalizeXML( doc.toString( -1 ) ) );
575+
576+
if ( normalizedExpected != normalizedGot )
577+
{
578+
qDebug( "Normalized expected: %s", normalizedExpected.toAscii().data() );
579+
qDebug( "Normalized got: %s", normalizedGot.toAscii().data() );
580+
}
581+
QCOMPARE( normalizedExpected, normalizedGot );
566582
}
567583

568584
void TestQgsOgcUtils::testSQLStatementToOgcFilter_data()

0 commit comments

Comments
 (0)