|
@@ -4867,6 +4867,8 @@ void TestQgsProcessing::parameterVectorOut() |
|
|
def.reset( new QgsProcessingParameterVectorDestination( "with_geom", QString(), QgsProcessing::TypeVectorAnyGeometry, QString(), true ) ); |
|
|
DummyProvider3 provider; |
|
|
QString error; |
|
|
QVERIFY( provider.isSupportedOutputValue( QVariant(), def.get(), context, error ) ); // optional |
|
|
QVERIFY( provider.isSupportedOutputValue( QString(), def.get(), context, error ) ); // optional |
|
|
QVERIFY( !provider.isSupportedOutputValue( "d:/test.shp", def.get(), context, error ) ); |
|
|
QVERIFY( !provider.isSupportedOutputValue( "d:/test.SHP", def.get(), context, error ) ); |
|
|
QVERIFY( !provider.isSupportedOutputValue( "ogr:d:/test.shp", def.get(), context, error ) ); |
|
@@ -4875,6 +4877,9 @@ void TestQgsProcessing::parameterVectorOut() |
|
|
QVERIFY( provider.isSupportedOutputValue( "d:/test.MIF", def.get(), context, error ) ); |
|
|
QVERIFY( provider.isSupportedOutputValue( "ogr:d:/test.MIF", def.get(), context, error ) ); |
|
|
QVERIFY( provider.isSupportedOutputValue( QgsProcessingOutputLayerDefinition( "d:/test.MIF" ), def.get(), context, error ) ); |
|
|
def.reset( new QgsProcessingParameterVectorDestination( "with_geom", QString(), QgsProcessing::TypeVectorAnyGeometry, QString(), false ) ); |
|
|
QVERIFY( !provider.isSupportedOutputValue( QVariant(), def.get(), context, error ) ); // non-optional |
|
|
QVERIFY( !provider.isSupportedOutputValue( QString(), def.get(), context, error ) ); // non-optional |
|
|
|
|
|
provider.loadAlgorithms(); |
|
|
def->mOriginalProvider = &provider; |
|
@@ -4986,6 +4991,8 @@ void TestQgsProcessing::parameterRasterOut() |
|
|
|
|
|
DummyProvider3 provider; |
|
|
QString error; |
|
|
QVERIFY( !provider.isSupportedOutputValue( QVariant(), def.get(), context, error ) ); |
|
|
QVERIFY( !provider.isSupportedOutputValue( QString(), def.get(), context, error ) ); |
|
|
QVERIFY( !provider.isSupportedOutputValue( "d:/test.tif", def.get(), context, error ) ); |
|
|
QVERIFY( !provider.isSupportedOutputValue( "d:/test.TIF", def.get(), context, error ) ); |
|
|
QVERIFY( !provider.isSupportedOutputValue( QgsProcessingOutputLayerDefinition( "d:/test.tif" ), def.get(), context, error ) ); |
|
|