Skip to content

Commit

Permalink
Merge pull request #1659 from arcaneframework/dev/sdc-test-persistent…
Browse files Browse the repository at this point in the history
…-vtk-property

Test vtk read property persistence
  • Loading branch information
stdcm authored Oct 4, 2024
2 parents 1566780 + 19b574d commit 55a4e82
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions arcane/src/arcane/tests/MeshUnitTest.axl
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,11 @@ Teste la désallocation du maillage
</description>
</simple>

<simple name = "check-read-property" type = "string" minOccurs="0" maxOccurs="unbounded">
<description>
Indique que l'on veut vérifier si la variable dont le nom est donnée a bien été créée et conservée.
</description>
</simple>

</options>
</service>
11 changes: 10 additions & 1 deletion arcane/src/arcane/tests/MeshUnitTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,19 @@ _testUsedVariables()
info() << "Cell variables:";
VariableList vars;
cell_family->usedVariables(vars);
std::set<String> var_names;
for( VariableList::Enumerator i(vars); ++i; ){
IVariable* var = *i;
info() << "name=" << var->name();
info() << "name=" << var->name();
var_names.insert(var->name());
}
auto read_var_check_names = options()->checkReadProperty.view();
for (auto read_var_check_name : read_var_check_names) {
if (var_names.find(read_var_check_name) == var_names.end()) {
ARCANE_FATAL("Error while reading mesh {0}. Variable {1} is not kept after reading.", mesh()->name(), read_var_check_name);
}
}

}

/*---------------------------------------------------------------------------*/
Expand Down
1 change: 1 addition & 0 deletions arcane/tests/testMesh-2-small-vtk.arc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<module-test-unitaire>
<test name="MeshUnitTest">
<check-read-property>ReadCellProperty</check-read-property>
</test>
</module-test-unitaire>

Expand Down

0 comments on commit 55a4e82

Please sign in to comment.