Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update tests
  • Loading branch information
roya0045 committed Dec 8, 2021
1 parent c30d996 commit cbc0f74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -5477,7 +5477,7 @@ static QVariant fcnGetFeature( const QVariantList &values, const QgsExpressionCo
}
QgsFeatureRequest req;
QString cacheValueKey;
if ( values.size() == 2 && values.at( 1 ).type() == QVariant::Map )
if ( values.size() == 2 && values.at( 1 ).type() == QVariant::Map )
{
QVariantMap attributeMap = QgsExpressionUtils::getMapValue( values.at( 1 ), parent );

Expand Down
4 changes: 2 additions & 2 deletions tests/src/core/testqgsexpression.cpp
Expand Up @@ -2252,8 +2252,8 @@ class TestQgsExpression: public QObject
QTest::newRow( "get_feature multi2" ) << "get_feature('test',map('col1','3','col2','test3'))" << true << 3;

// multi-param no match
QTest::newRow( "get_feature no match-multi1" ) << "get_feature('test',array('col1','col2'),'no match!')" << false << -1;
QTest::newRow( "get_feature no match-multi2" ) << "get_feature('test',array('col1','col2'),array('10','test3'))" << false << -1;
QTest::newRow( "get_feature no match-multi1" ) << "get_feature('test',map('col1','col2'),'no match!')" << false << -1;
QTest::newRow( "get_feature no match-multi2" ) << "get_feature('test',map('col2','10','col4','test3'))" << false << -1;

}

Expand Down

0 comments on commit cbc0f74

Please sign in to comment.