Skip to content

Commit a198e30

Browse files
committedJun 16, 2020
Update test
1 parent 281356a commit a198e30

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
 

‎tests/src/analysis/testqgsprocessing.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9432,8 +9432,9 @@ void TestQgsProcessing::modelExecution()
94329432
// Check variables for child algorithm
94339433
// without values
94349434
QMap<QString, QgsProcessingModelAlgorithm::VariableDefinition> variables = model2.variablesForChildAlgorithm( "cx1", context );
9435-
QCOMPARE( variables.count(), 6 );
9435+
QCOMPARE( variables.count(), 7 );
94369436
QCOMPARE( variables.value( "DIST" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
9437+
QCOMPARE( variables.value( "CRS" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
94379438
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
94389439
QCOMPARE( variables.value( "SOURCE_LAYER_minx" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
94399440
QCOMPARE( variables.value( "SOURCE_LAYER_miny" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
@@ -9442,7 +9443,7 @@ void TestQgsProcessing::modelExecution()
94429443

94439444
// with values
94449445
variables = model2.variablesForChildAlgorithm( "cx1", context, modelInputs, childResults );
9445-
QCOMPARE( variables.count(), 6 );
9446+
QCOMPARE( variables.count(), 7 );
94469447
QCOMPARE( variables.value( "DIST" ).value.toInt(), 271 );
94479448
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.parameterName(), QString( "SOURCE_LAYER" ) );
94489449
QGSCOMPARENEAR( variables.value( "SOURCE_LAYER_minx" ).value.toDouble(), -118.8888, 0.001 );
@@ -9452,7 +9453,7 @@ void TestQgsProcessing::modelExecution()
94529453

94539454
std::unique_ptr< QgsExpressionContextScope > childScope( model2.createExpressionContextScopeForChildAlgorithm( "cx1", context, modelInputs, childResults ) );
94549455
QCOMPARE( childScope->name(), QStringLiteral( "algorithm_inputs" ) );
9455-
QCOMPARE( childScope->variableCount(), 6 );
9456+
QCOMPARE( childScope->variableCount(), 7 );
94569457
QCOMPARE( childScope->variable( "DIST" ).toInt(), 271 );
94579458
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.parameterName(), QString( "SOURCE_LAYER" ) );
94589459
QGSCOMPARENEAR( childScope->variable( "SOURCE_LAYER_minx" ).toDouble(), -118.8888, 0.001 );
@@ -9477,7 +9478,7 @@ void TestQgsProcessing::modelExecution()
94779478
QCOMPARE( params.count(), 2 );
94789479

94799480
variables = model2.variablesForChildAlgorithm( "cx2", context );
9480-
QCOMPARE( variables.count(), 11 );
9481+
QCOMPARE( variables.count(), 12 );
94819482
QCOMPARE( variables.value( "DIST" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
94829483
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
94839484
QCOMPARE( variables.value( "SOURCE_LAYER_minx" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
@@ -9497,7 +9498,7 @@ void TestQgsProcessing::modelExecution()
94979498

94989499
// with values
94999500
variables = model2.variablesForChildAlgorithm( "cx2", context, modelInputs, childResults );
9500-
QCOMPARE( variables.count(), 11 );
9501+
QCOMPARE( variables.count(), 12 );
95019502
QCOMPARE( variables.value( "DIST" ).value.toInt(), 271 );
95029503
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.parameterName(), QString( "SOURCE_LAYER" ) );
95039504
QCOMPARE( variables.value( "cx1_OUTPUT" ).source.outputChildId(), QString( "cx1" ) );
@@ -9549,7 +9550,7 @@ void TestQgsProcessing::modelExecution()
95499550

95509551

95519552
variables = model2.variablesForChildAlgorithm( "cx3", context );
9552-
QCOMPARE( variables.count(), 16 );
9553+
QCOMPARE( variables.count(), 17 );
95539554
QCOMPARE( variables.value( "DIST" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
95549555
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
95559556
QCOMPARE( variables.value( "SOURCE_LAYER_minx" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
@@ -9578,7 +9579,7 @@ void TestQgsProcessing::modelExecution()
95789579
QCOMPARE( variables.value( "cx2_OUTPUT_maxy" ).source.outputChildId(), QStringLiteral( "cx2" ) );
95799580
// with values
95809581
variables = model2.variablesForChildAlgorithm( "cx3", context, modelInputs, childResults );
9581-
QCOMPARE( variables.count(), 16 );
9582+
QCOMPARE( variables.count(), 17 );
95829583
QCOMPARE( variables.value( "DIST" ).value.toInt(), 271 );
95839584
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.parameterName(), QString( "SOURCE_LAYER" ) );
95849585
QCOMPARE( variables.value( "cx1_OUTPUT" ).source.outputChildId(), QString( "cx1" ) );

0 commit comments

Comments
 (0)
Please sign in to comment.