Skip to content

Commit

Permalink
testqgsogcutils.cpp: add more debug output to diagnose flake failure …
Browse files Browse the repository at this point in the history
…on QT5
  • Loading branch information
rouault committed Jun 10, 2016
1 parent 76bf6e0 commit 12bb1f7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/src/core/testqgsogcutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,15 @@ void TestQgsOgcUtils::testExpressionToOgcFilterWFS20()
qDebug( "SRSNAME: %s", srsName.toAscii().data() );
qDebug( "OGC : %s", doc.toString( -1 ).toAscii().data() );

QCOMPARE( normalizeXML( xmlText ), normalizeXML( doc.toString( -1 ) ) );
QString normalizedExpected( normalizeXML( xmlText ) );
QString normalizedGot( normalizeXML( doc.toString( -1 ) ) );

if ( normalizedExpected != normalizedGot )
{
qDebug( "Normalized expected: %s", normalizedExpected.toAscii().data() );
qDebug( "Normalized got: %s", normalizedGot.toAscii().data() );
}
QCOMPARE( normalizedExpected, normalizedGot );
}

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

QCOMPARE( normalizeXML( xmlText ), normalizeXML( doc.toString( -1 ) ) );
QString normalizedExpected( normalizeXML( xmlText ) );
QString normalizedGot( normalizeXML( doc.toString( -1 ) ) );

if ( normalizedExpected != normalizedGot )
{
qDebug( "Normalized expected: %s", normalizedExpected.toAscii().data() );
qDebug( "Normalized got: %s", normalizedGot.toAscii().data() );
}
QCOMPARE( normalizedExpected, normalizedGot );
}

void TestQgsOgcUtils::testSQLStatementToOgcFilter_data()
Expand Down

0 comments on commit 12bb1f7

Please sign in to comment.