@@ -5319,6 +5319,8 @@ void TestQgsProcessing::parameterVectorOut()
53195319 def.reset ( new QgsProcessingParameterVectorDestination ( " with_geom" , QString (), QgsProcessing::TypeVectorAnyGeometry, QString (), true ) );
53205320 DummyProvider3 provider;
53215321 QString error;
5322+ QVERIFY ( provider.isSupportedOutputValue ( QVariant (), def.get (), context, error ) ); // optional
5323+ QVERIFY ( provider.isSupportedOutputValue ( QString (), def.get (), context, error ) ); // optional
53225324 QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.shp" , def.get (), context, error ) );
53235325 QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.SHP" , def.get (), context, error ) );
53245326 QVERIFY ( !provider.isSupportedOutputValue ( " ogr:d:/test.shp" , def.get (), context, error ) );
@@ -5327,6 +5329,9 @@ void TestQgsProcessing::parameterVectorOut()
53275329 QVERIFY ( provider.isSupportedOutputValue ( " d:/test.MIF" , def.get (), context, error ) );
53285330 QVERIFY ( provider.isSupportedOutputValue ( " ogr:d:/test.MIF" , def.get (), context, error ) );
53295331 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
53305335
53315336 provider.loadAlgorithms ();
53325337 def->mOriginalProvider = &provider;
@@ -5442,6 +5447,8 @@ void TestQgsProcessing::parameterRasterOut()
54425447
54435448 DummyProvider3 provider;
54445449 QString error;
5450+ QVERIFY ( !provider.isSupportedOutputValue ( QVariant (), def.get (), context, error ) );
5451+ QVERIFY ( !provider.isSupportedOutputValue ( QString (), def.get (), context, error ) );
54455452 QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.tif" , def.get (), context, error ) );
54465453 QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.TIF" , def.get (), context, error ) );
54475454 QVERIFY ( !provider.isSupportedOutputValue ( QgsProcessingOutputLayerDefinition ( " d:/test.tif" ), def.get (), context, error ) );
0 commit comments