Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix previous commit
  • Loading branch information
rouault committed May 25, 2019
1 parent 31c25e4 commit 3f46a55
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/src/core/testqgsjsonutils.cpp
Expand Up @@ -89,7 +89,7 @@ class TestQgsJsonUtils : public QObject

void testExportAttributesJson_data()
{
QTest::addColumn<JsonAlgs>( "JsonAlgs" );
QTest::addColumn<JsonAlgs>( "jsonAlg" );
QTest::newRow( "Use json" ) << JsonAlgs::Json;
QTest::newRow( "Use old string concat" ) << JsonAlgs::String;
}
Expand Down Expand Up @@ -133,10 +133,10 @@ class TestQgsJsonUtils : public QObject
QgsJsonExporter exporter { &vl };

const auto expectedJson { 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.0,2.0],[3.0,2.0],[3.0,3.0],[2.0,3.0],[2.0,2.0]]],\"type\":\"Polygon\"}"
",\"id\":0,\"properties\":{\"flddbl\":2.0,\"fldint\":1,\"fldtxt\":\"a value\"}"
",\"type\":\"Feature\"}" ) };
"[[[1.12,1.34],[5.45,1.12],[5.34,5.33],[1.56,5.2],[1.12,1.34]],"
"[[2.0,2.0],[3.0,2.0],[3.0,3.0],[2.0,3.0],[2.0,2.0]]],\"type\":\"Polygon\"}"
",\"id\":0,\"properties\":{\"flddbl\":2.0,\"fldint\":1,\"fldtxt\":\"a value\"}"
",\"type\":\"Feature\"}" ) };

const auto j { exporter.exportFeatureToJsonObject( feature ) };
QCOMPARE( QString::fromStdString( j.dump() ), expectedJson );
Expand Down

0 comments on commit 3f46a55

Please sign in to comment.