Skip to content
Permalink
Browse files

[processing] add tests for creating outputs from FileDestination

parameter

(cherry picked from commit a217904)
  • Loading branch information
alexbruy committed Mar 2, 2018
1 parent a648d91 commit e11a17d619b868ada0cf69332bc893207688b574
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 e11a17d

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