Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Apr 1, 2022
1 parent 8b4a58a commit 1b83ca0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/SerialIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4674,6 +4674,12 @@ void variableBasedSeries(std::string const &file)
std::vector<int> data(1000, i);
E_x.storeChunk(data, {0}, {1000});

if (i > 2)
{
iteration.setAttribute(
"iteration_is_larger_than_two", "it truly is");
}

// this tests changing extents and dimensionalities
// across iterations
auto E_y = iteration.meshes["E"]["y"];
Expand Down Expand Up @@ -4709,6 +4715,18 @@ void variableBasedSeries(std::string const &file)
size_t last_iteration_index = 0;
for (auto iteration : readSeries.readIterations())
{
if (iteration.iterationIndex > 2)
{
REQUIRE(
iteration.getAttribute("iteration_is_larger_than_two")
.get<std::string>() == "it truly is");
}
else
{
REQUIRE_FALSE(iteration.containsAttribute(
"iteration_is_larger_than_two"));
}

auto E_x = iteration.meshes["E"]["x"];
REQUIRE(E_x.getDimensionality() == 1);
REQUIRE(E_x.getExtent()[0] == extent);
Expand Down

0 comments on commit 1b83ca0

Please sign in to comment.