Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 7, 2017
1 parent 5595f40 commit 7724613
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/src/core/testqgsexpression.cpp
Expand Up @@ -420,9 +420,12 @@ class TestQgsExpression: public QObject
if ( expression3.hasEvalError() )
qDebug() << expression3.evalErrorString();
Q_ASSERT( !expression3.hasEvalError() );
expression3.prepare( &context );

mPointsLayer->getFeatures( QgsFeatureRequest().setFilterExpression( "Pilots = 1" ) ).nextFeature( feature );
context.setFeature( feature );

QCOMPARE( expression.evaluate( &context ).toString(), QStringLiteral( "one" ) );
expression3.prepare( &context );
QCOMPARE( expression.evaluate( &context ).toString(), QStringLiteral( "one" ) );


Expand Down

0 comments on commit 7724613

Please sign in to comment.