From 1b83ca019c47fd23cebbc20770a5762a7888a096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Fri, 1 Apr 2022 14:35:40 +0200 Subject: [PATCH] Test --- test/SerialIOTest.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/SerialIOTest.cpp b/test/SerialIOTest.cpp index 6209f47d8c..2f7266db15 100644 --- a/test/SerialIOTest.cpp +++ b/test/SerialIOTest.cpp @@ -4674,6 +4674,12 @@ void variableBasedSeries(std::string const &file) std::vector 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"]; @@ -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() == "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);