@@ -9432,8 +9432,9 @@ void TestQgsProcessing::modelExecution()
9432
9432
// Check variables for child algorithm
9433
9433
// without values
9434
9434
QMap<QString, QgsProcessingModelAlgorithm::VariableDefinition> variables = model2.variablesForChildAlgorithm( "cx1", context );
9435
- QCOMPARE( variables.count(), 6 );
9435
+ QCOMPARE( variables.count(), 7 );
9436
9436
QCOMPARE( variables.value( "DIST" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
9437
+ QCOMPARE( variables.value( "CRS" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
9437
9438
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
9438
9439
QCOMPARE( variables.value( "SOURCE_LAYER_minx" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
9439
9440
QCOMPARE( variables.value( "SOURCE_LAYER_miny" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
@@ -9442,7 +9443,7 @@ void TestQgsProcessing::modelExecution()
9442
9443
9443
9444
// with values
9444
9445
variables = model2.variablesForChildAlgorithm( "cx1", context, modelInputs, childResults );
9445
- QCOMPARE( variables.count(), 6 );
9446
+ QCOMPARE( variables.count(), 7 );
9446
9447
QCOMPARE( variables.value( "DIST" ).value.toInt(), 271 );
9447
9448
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.parameterName(), QString( "SOURCE_LAYER" ) );
9448
9449
QGSCOMPARENEAR( variables.value( "SOURCE_LAYER_minx" ).value.toDouble(), -118.8888, 0.001 );
@@ -9452,7 +9453,7 @@ void TestQgsProcessing::modelExecution()
9452
9453
9453
9454
std::unique_ptr< QgsExpressionContextScope > childScope( model2.createExpressionContextScopeForChildAlgorithm( "cx1", context, modelInputs, childResults ) );
9454
9455
QCOMPARE( childScope->name(), QStringLiteral( "algorithm_inputs" ) );
9455
- QCOMPARE( childScope->variableCount(), 6 );
9456
+ QCOMPARE( childScope->variableCount(), 7 );
9456
9457
QCOMPARE( childScope->variable( "DIST" ).toInt(), 271 );
9457
9458
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.parameterName(), QString( "SOURCE_LAYER" ) );
9458
9459
QGSCOMPARENEAR( childScope->variable( "SOURCE_LAYER_minx" ).toDouble(), -118.8888, 0.001 );
@@ -9477,7 +9478,7 @@ void TestQgsProcessing::modelExecution()
9477
9478
QCOMPARE( params.count(), 2 );
9478
9479
9479
9480
variables = model2.variablesForChildAlgorithm( "cx2", context );
9480
- QCOMPARE( variables.count(), 11 );
9481
+ QCOMPARE( variables.count(), 12 );
9481
9482
QCOMPARE( variables.value( "DIST" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
9482
9483
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
9483
9484
QCOMPARE( variables.value( "SOURCE_LAYER_minx" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
@@ -9497,7 +9498,7 @@ void TestQgsProcessing::modelExecution()
9497
9498
9498
9499
// with values
9499
9500
variables = model2.variablesForChildAlgorithm( "cx2", context, modelInputs, childResults );
9500
- QCOMPARE( variables.count(), 11 );
9501
+ QCOMPARE( variables.count(), 12 );
9501
9502
QCOMPARE( variables.value( "DIST" ).value.toInt(), 271 );
9502
9503
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.parameterName(), QString( "SOURCE_LAYER" ) );
9503
9504
QCOMPARE( variables.value( "cx1_OUTPUT" ).source.outputChildId(), QString( "cx1" ) );
@@ -9549,7 +9550,7 @@ void TestQgsProcessing::modelExecution()
9549
9550
9550
9551
9551
9552
variables = model2.variablesForChildAlgorithm( "cx3", context );
9552
- QCOMPARE( variables.count(), 16 );
9553
+ QCOMPARE( variables.count(), 17 );
9553
9554
QCOMPARE( variables.value( "DIST" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
9554
9555
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
9555
9556
QCOMPARE( variables.value( "SOURCE_LAYER_minx" ).source.source(), QgsProcessingModelChildParameterSource::ModelParameter );
@@ -9578,7 +9579,7 @@ void TestQgsProcessing::modelExecution()
9578
9579
QCOMPARE( variables.value( "cx2_OUTPUT_maxy" ).source.outputChildId(), QStringLiteral( "cx2" ) );
9579
9580
// with values
9580
9581
variables = model2.variablesForChildAlgorithm( "cx3", context, modelInputs, childResults );
9581
- QCOMPARE( variables.count(), 16 );
9582
+ QCOMPARE( variables.count(), 17 );
9582
9583
QCOMPARE( variables.value( "DIST" ).value.toInt(), 271 );
9583
9584
QCOMPARE( variables.value( "SOURCE_LAYER" ).source.parameterName(), QString( "SOURCE_LAYER" ) );
9584
9585
QCOMPARE( variables.value( "cx1_OUTPUT" ).source.outputChildId(), QString( "cx1" ) );
0 commit comments