Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere authored and nyalldawson committed Jun 17, 2020
1 parent 7ad14fc commit 7bed52c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/src/analysis/testqgsrastercalculator.cpp
Expand Up @@ -589,7 +589,6 @@ void TestQgsRasterCalculator::findNodes()
node = QgsRasterCalcNode::parseRasterCalcString( QStringLiteral( "max(-1,1)" ), errorString );
QVERIFY( node );
QVERIFY( errorString.isEmpty() );

}

void TestQgsRasterCalculator::testRasterEntries()
Expand Down Expand Up @@ -743,6 +742,12 @@ void TestQgsRasterCalculator::toString()
// Test regression #32477
QCOMPARE( _test( QStringLiteral( R"raw(("r@1"<100.09)*0.1)raw" ), true ),
QString( R"raw(( float ) ( ( float ) "r@1" < ( float ) 100.09 ) * ( float ) 0.1)raw" ) );

QString error;
std::unique_ptr< QgsRasterCalcNode > calcNode( QgsRasterCalcNode::parseRasterCalcString( QStringLiteral( "min( \"raster@1\" )" ), error ) );
QVERIFY( calcNode == nullptr );
calcNode.reset( QgsRasterCalcNode::parseRasterCalcString( QStringLiteral( "max( \"raster@1\" )" ), error ) );
QVERIFY( calcNode == nullptr );
}

void TestQgsRasterCalculator::calcFormulasWithReprojectedLayers()
Expand Down

0 comments on commit 7bed52c

Please sign in to comment.