Skip to content

Commit

Permalink
add tests for expressionInOperator on lists with only one item
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Apr 19, 2023
1 parent 8169a53 commit 7f84aaa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/src/core/testqgsogcutils.cpp
Expand Up @@ -700,6 +700,24 @@ void TestQgsOgcUtils::testExpressionToOgcFilter_data()
"</ogc:Not>"
"</ogc:Filter>" );

QTest::newRow( "in" ) << QStringLiteral( "A IN (10)" ) << QString(
"<ogc:Filter xmlns:ogc=\"http://www.opengis.net/ogc\">"
"<ogc:PropertyIsEqualTo>"
"<ogc:PropertyName>A</ogc:PropertyName>"
"<ogc:Literal>10</ogc:Literal>"
"</ogc:PropertyIsEqualTo>"
"</ogc:Filter>" );

QTest::newRow( "not in" ) << QStringLiteral( "A NOT IN (10)" ) << QString(
"<ogc:Filter xmlns:ogc=\"http://www.opengis.net/ogc\">"
"<ogc:Not>"
"<ogc:PropertyIsEqualTo>"
"<ogc:PropertyName>A</ogc:PropertyName>"
"<ogc:Literal>10</ogc:Literal>"
"</ogc:PropertyIsEqualTo>"
"</ogc:Not>"
"</ogc:Filter>" );

QTest::newRow( "intersects_bbox" ) << QStringLiteral( "intersects_bbox($geometry, geomFromWKT('POINT (5 6)'))" ) << QString(
"<ogc:Filter xmlns:ogc=\"http://www.opengis.net/ogc\" xmlns:gml=\"http://www.opengis.net/gml\">"
"<ogc:BBOX>"
Expand Down

0 comments on commit 7f84aaa

Please sign in to comment.