Skip to content
Permalink
Browse files

Add test

  • Loading branch information
m-kuhn committed Nov 7, 2017
1 parent 5595f40 commit 77246136fe0cd3ec5a96f363db9533bf0b0b7b29
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests/src/core/testqgsexpression.cpp
@@ -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" ) );


0 comments on commit 7724613

Please sign in to comment.
You can’t perform that action at this time.