Skip to content

Commit

Permalink
test for mesh calculator IF operator and temporal dataset group
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec authored and github-actions[bot] committed Jun 18, 2021
1 parent 640ae1b commit 7ab5cdc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/src/analysis/testqgsmeshcalculator.cpp
Expand Up @@ -395,7 +395,10 @@ void TestQgsMeshCalculator::test_dataset_group_dependency()
formulas.append( QStringLiteral( " max_aggr ( \"VertexScalarDataset\") + 2" ) );
formulas.append( QStringLiteral( " max_aggr ( \"VertexScalarDataset\") + \"virtual_0\"" ) );
formulas.append( QStringLiteral( " \"virtual_0\" + max_aggr ( \"VertexScalarDataset\") + 1" ) );
QVector<int> sizes{10, 10, 2, 1, 1, 10, 10};
formulas.append( QStringLiteral( "if ( \"FaceScalarDataset\" = \"VertexScalarDataset\" , 0 , 1 )" ) ); //temporal one, must have several datasets
formulas.append( QStringLiteral( "if ( 2 = 1 , 0 , 1 )" ) ); //dtatic one, must have one dataset
formulas.append( QStringLiteral( "if ( 2 = 1 , \"FaceScalarDataset\" , 1 )" ) ); //temporal one, must have several datasets
QVector<int> sizes{10, 10, 2, 1, 1, 10, 10, 2, 1, 2};

std::vector<std::unique_ptr<QgsMeshVirtualDatasetGroup>> virtualDatasetGroups( formulas.count() );

Expand All @@ -407,7 +410,7 @@ void TestQgsMeshCalculator::test_dataset_group_dependency()
mpMeshLayer->addDatasets( virtualDatasetGroups[i].release() );
}

QCOMPARE( 24, mpMeshLayer->datasetGroupCount() );
QCOMPARE( 27, mpMeshLayer->datasetGroupCount() );

QgsMeshDatasetGroupTreeItem *rootItem = mpMeshLayer->datasetGroupTreeRootItem();

Expand Down

0 comments on commit 7ab5cdc

Please sign in to comment.