Skip to content

Commit

Permalink
add test case for not existing triangular mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCaha committed Dec 20, 2024
1 parent 115c544 commit 9510eea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/src/core/testqgsmeshlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2423,10 +2423,17 @@ void TestQgsMeshLayer::testMinimumMaximumActiveScalarDataset()
QStringLiteral( "mdal" )
);
QVERIFY( layer.isValid() );
layer.updateTriangularMesh();

datasetIndex = QgsMeshDatasetIndex( 0, 0 );

// if triangular mesh does not exist cannot extract values
extent = layer.extent();
found = layer.minimumMaximumActiveScalarDataset( extent, datasetIndex, min, max );
QCOMPARE( found, false );

// crete triangular mesh for layer
layer.updateTriangularMesh();

// tests for basic dataset
extent = layer.extent();
found = layer.minimumMaximumActiveScalarDataset( extent, datasetIndex, min, max );
Expand Down

0 comments on commit 9510eea

Please sign in to comment.