Skip to content
Permalink
Browse files

[processing] add tests for creating outputs from FileDestination

parameter
  • Loading branch information
alexbruy committed Mar 2, 2018
1 parent 6f38a50 commit a2179046e83a568a07e7ebb851c8490e498141dc
Showing with 10 additions and 0 deletions.
  1. +10 −0 tests/src/analysis/testqgsprocessing.cpp
@@ -4398,6 +4398,16 @@ void TestQgsProcessing::parameterFileOut()
QCOMPARE( fromCode->description(), QStringLiteral( "optional" ) );
QCOMPARE( fromCode->flags(), def->flags() );
QCOMPARE( fromCode->defaultValue(), def->defaultValue() );

// outputs definitio test
def.reset( new QgsProcessingParameterFileDestination( "html", QString(), QString( "HTML files" ), QString(), false ) );
QVERIFY( dynamic_cast< QgsProcessingOutputHtml *>( def->toOutputDefinition() ) );
def.reset( new QgsProcessingParameterFileDestination( "html", QString(), QString( "Text files (*.htm)" ), QString(), false ) );
QVERIFY( dynamic_cast< QgsProcessingOutputHtml *>( def->toOutputDefinition() ) );
def.reset( new QgsProcessingParameterFileDestination( "file", QString(), QString( "Text files (*.txt)" ), QString(), false ) );
QVERIFY( dynamic_cast< QgsProcessingOutputFile *>( def->toOutputDefinition() ) );
def.reset( new QgsProcessingParameterFileDestination( "file", QString(), QString(), QString(), false ) );
QVERIFY( dynamic_cast< QgsProcessingOutputFile *>( def->toOutputDefinition() ) );
}

void TestQgsProcessing::parameterFolderOut()

0 comments on commit a217904

Please sign in to comment.
You can’t perform that action at this time.