Skip to content
Permalink
Browse files

Fix build

  • Loading branch information
nyalldawson committed Feb 12, 2019
1 parent 60a1d63 commit d281c8aef597953baaf861f07e5727a8e7b4a81d
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/src/analysis/testqgsprocessing.cpp
@@ -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" ) ) );

0 comments on commit d281c8a

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