mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Fix previous commit
This commit is contained in:
parent
31c25e4872
commit
3f46a55259
@ -89,7 +89,7 @@ class TestQgsJsonUtils : public QObject
|
|||||||
|
|
||||||
void testExportAttributesJson_data()
|
void testExportAttributesJson_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<JsonAlgs>( "JsonAlgs" );
|
QTest::addColumn<JsonAlgs>( "jsonAlg" );
|
||||||
QTest::newRow( "Use json" ) << JsonAlgs::Json;
|
QTest::newRow( "Use json" ) << JsonAlgs::Json;
|
||||||
QTest::newRow( "Use old string concat" ) << JsonAlgs::String;
|
QTest::newRow( "Use old string concat" ) << JsonAlgs::String;
|
||||||
}
|
}
|
||||||
@ -133,10 +133,10 @@ class TestQgsJsonUtils : public QObject
|
|||||||
QgsJsonExporter exporter { &vl };
|
QgsJsonExporter exporter { &vl };
|
||||||
|
|
||||||
const auto expectedJson { QStringLiteral( "{\"bbox\":[[1.12,1.12,5.45,5.33]],\"geometry\":{\"coordinates\":"
|
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]],"
|
"[[[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\"}"
|
"[[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\"}"
|
",\"id\":0,\"properties\":{\"flddbl\":2.0,\"fldint\":1,\"fldtxt\":\"a value\"}"
|
||||||
",\"type\":\"Feature\"}" ) };
|
",\"type\":\"Feature\"}" ) };
|
||||||
|
|
||||||
const auto j { exporter.exportFeatureToJsonObject( feature ) };
|
const auto j { exporter.exportFeatureToJsonObject( feature ) };
|
||||||
QCOMPARE( QString::fromStdString( j.dump() ), expectedJson );
|
QCOMPARE( QString::fromStdString( j.dump() ), expectedJson );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user