Skip to content
Permalink
Browse files

Fix QCOMPARE in the test

  • Loading branch information
elpaso committed Apr 18, 2019
1 parent a809625 commit 103981deb5f404ec54d4199c9ecd5ae930d64af1
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/src/core/testqgsjsonutils.cpp
@@ -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
@@ -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\"}"

0 comments on commit 103981d

Please sign in to comment.
You can’t perform that action at this time.