@@ -190,7 +190,7 @@ TEST_CASE("myPath", "[core]")
190190{
191191#if openPMD_USE_INVASIVE_TESTS
192192 using vec_t = std::vector<std::string>;
193- auto pathOf = [](Attributable &attr) {
193+ auto pathOf = [](Attributable const &attr) {
194194 auto res = attr.myPath ();
195195#if false
196196 std::cout << " Directory:\t " << res.directory << " \n Series name:\t "
@@ -206,6 +206,8 @@ TEST_CASE("myPath", "[core]")
206206
207207 Series series (" ../samples/myPath.json" , Access::CREATE);
208208 REQUIRE (pathOf (series) == vec_t {});
209+ REQUIRE (pathOf (series.iterations ) == vec_t {" data" });
210+ REQUIRE (pathOf (series.snapshots ()) == vec_t {" data" });
209211 auto iteration = series.iterations [1234 ];
210212 REQUIRE (pathOf (iteration) == vec_t {" data" , " 1234" });
211213
@@ -378,6 +380,12 @@ TEST_CASE("output_modification_test", "[core]")
378380 o.setName (" MyOutput" );
379381 REQUIRE (o.name () == " MyOutput" );
380382
383+ o.snapshots ().setAttribute (" test" , " value" );
384+ REQUIRE (o.iterations .getAttribute (" test" ).get <std::string>() == " value" );
385+
386+ o.iterations .setAttribute <int >(" test2" , 2 );
387+ REQUIRE (o.snapshots ().getAttribute (" test2" ).get <int >() == 2 );
388+
381389 o.iterations [0 ];
382390}
383391
0 commit comments