Fix previous commit

This commit is contained in:
Even Rouault 2019-05-25 20:34:02 +02:00
parent 31c25e4872
commit 3f46a55259
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D

View File

@ -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;
}
@ -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 );