Skip to content

Commit

Permalink
Fix QCOMPARE in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Apr 18, 2019
1 parent a809625 commit 103981d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/core/testqgsjsonutils.cpp
Expand Up @@ -96,7 +96,7 @@ class TestQgsJsonUtils : public QObject
QBENCHMARK
{
const auto json { QgsJsonUtils::exportAttributesToJsonObject( feature, &vl ) };
QCOMPARE( QJsonDocument( json ).toJson( QJsonDocument::JsonFormat::Compact ), QStringLiteral( "{\"flddbl\":2,\"fldint\":1,\"fldtxt\":\"a value\"}" ) );
QCOMPARE( QString( QJsonDocument( json ).toJson( QJsonDocument::JsonFormat::Compact ) ), QStringLiteral( R"raw({"flddbl":2,"fldint":1,"fldtxt":"a value"})raw" ) );
}
}
else // average: 0.0070 msecs per iteration
Expand Down Expand Up @@ -133,7 +133,7 @@ class TestQgsJsonUtils : public QObject
QBENCHMARK
{
const auto json { exporter.exportFeatureToJsonObject( feature ) };
QCOMPARE( QJsonDocument( json ).toJson( QJsonDocument::JsonFormat::Compact ),
QCOMPARE( QString( QJsonDocument( json ).toJson( QJsonDocument::JsonFormat::Compact ) ),
QStringLiteral( "{\"bbox\":[1.12,1.12,5.45,5.33],\"geometry\":{\"coordinates\":[[[1.12,1.34]"
",[5.45,1.12],[5.34,5.33],[1.56,5.2],[1.12,1.34]],[[2,2],[3,2],[3,3],[2,3],[2,2]]],"
"\"type\":\"Polygon\"},\"id\":0,\"properties\":{\"flddbl\":2,\"fldint\":1,\"fldtxt\":\"a value\"},\"type\":\"Feature\"}"
Expand Down

0 comments on commit 103981d

Please sign in to comment.