@@ -5319,6 +5319,8 @@ void TestQgsProcessing::parameterVectorOut()
5319
5319
def.reset ( new QgsProcessingParameterVectorDestination ( " with_geom" , QString (), QgsProcessing::TypeVectorAnyGeometry, QString (), true ) );
5320
5320
DummyProvider3 provider;
5321
5321
QString error;
5322
+ QVERIFY ( provider.isSupportedOutputValue ( QVariant (), def.get (), context, error ) ); // optional
5323
+ QVERIFY ( provider.isSupportedOutputValue ( QString (), def.get (), context, error ) ); // optional
5322
5324
QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.shp" , def.get (), context, error ) );
5323
5325
QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.SHP" , def.get (), context, error ) );
5324
5326
QVERIFY ( !provider.isSupportedOutputValue ( " ogr:d:/test.shp" , def.get (), context, error ) );
@@ -5327,6 +5329,9 @@ void TestQgsProcessing::parameterVectorOut()
5327
5329
QVERIFY ( provider.isSupportedOutputValue ( " d:/test.MIF" , def.get (), context, error ) );
5328
5330
QVERIFY ( provider.isSupportedOutputValue ( " ogr:d:/test.MIF" , def.get (), context, error ) );
5329
5331
QVERIFY ( provider.isSupportedOutputValue ( QgsProcessingOutputLayerDefinition ( " d:/test.MIF" ), def.get (), context, error ) );
5332
+ def.reset ( new QgsProcessingParameterVectorDestination ( " with_geom" , QString (), QgsProcessing::TypeVectorAnyGeometry, QString (), false ) );
5333
+ QVERIFY ( !provider.isSupportedOutputValue ( QVariant (), def.get (), context, error ) ); // non-optional
5334
+ QVERIFY ( !provider.isSupportedOutputValue ( QString (), def.get (), context, error ) ); // non-optional
5330
5335
5331
5336
provider.loadAlgorithms ();
5332
5337
def->mOriginalProvider = &provider;
@@ -5442,6 +5447,8 @@ void TestQgsProcessing::parameterRasterOut()
5442
5447
5443
5448
DummyProvider3 provider;
5444
5449
QString error;
5450
+ QVERIFY ( !provider.isSupportedOutputValue ( QVariant (), def.get (), context, error ) );
5451
+ QVERIFY ( !provider.isSupportedOutputValue ( QString (), def.get (), context, error ) );
5445
5452
QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.tif" , def.get (), context, error ) );
5446
5453
QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.TIF" , def.get (), context, error ) );
5447
5454
QVERIFY ( !provider.isSupportedOutputValue ( QgsProcessingOutputLayerDefinition ( " d:/test.tif" ), def.get (), context, error ) );
0 commit comments