Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 12, 2019
1 parent 60a1d63 commit d281c8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/src/analysis/testqgsprocessing.cpp
Expand Up @@ -6020,13 +6020,13 @@ void TestQgsProcessing::modelScope()
pc.setProject( &p );
p.setFileName( TEST_DATA_DIR + QStringLiteral( "/test_file.qgs" ) );
scope.reset( QgsExpressionContextUtils::processingModelAlgorithmScope( &alg, params, pc ) );
QCOMPARE( scope->variable( QStringLiteral( "model_path" ) ).toString(), TEST_DATA_DIR + QStringLiteral( "/test_file.qgs" ) );
QCOMPARE( scope->variable( QStringLiteral( "model_folder" ) ).toString(), TEST_DATA_DIR );
QCOMPARE( scope->variable( QStringLiteral( "model_path" ) ).toString(), QStringLiteral( TEST_DATA_DIR ) + QStringLiteral( "/test_file.qgs" ) );
QCOMPARE( scope->variable( QStringLiteral( "model_folder" ) ).toString(), QStringLiteral( TEST_DATA_DIR ) );

alg.setSourceFilePath( TEST_DATA_DIR + QStringLiteral( "/processing/my_model.model3" ) );
scope.reset( QgsExpressionContextUtils::processingModelAlgorithmScope( &alg, params, pc ) );
QCOMPARE( scope->variable( QStringLiteral( "model_path" ) ).toString(), TEST_DATA_DIR + QStringLiteral( "/processing/my_model.model3" ) );
QCOMPARE( scope->variable( QStringLiteral( "model_folder" ) ).toString(), TEST_DATA_DIR + QStringLiteral( "/processing" ) );
QCOMPARE( scope->variable( QStringLiteral( "model_path" ) ).toString(), QStringLiteral( TEST_DATA_DIR ) + QStringLiteral( "/processing/my_model.model3" ) );
QCOMPARE( scope->variable( QStringLiteral( "model_folder" ) ).toString(), QStringLiteral( TEST_DATA_DIR ) + QStringLiteral( "/processing" ) );

QgsExpressionContext ctx = alg.createExpressionContext( QVariantMap(), pc );
QVERIFY( scope->hasVariable( QStringLiteral( "model_path" ) ) );
Expand Down

0 comments on commit d281c8a

Please sign in to comment.