Skip to content

Commit

Permalink
[processing] add tests for creating outputs from FileDestination
Browse files Browse the repository at this point in the history
parameter
  • Loading branch information
alexbruy committed Mar 2, 2018
1 parent 6f38a50 commit a217904
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/src/analysis/testqgsprocessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a217904

Please sign in to comment.