From d52c6faa66b63140f7eab57a794384ddd4cae718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 16 Dec 2024 10:58:32 +0100 Subject: [PATCH] CI fixes --- test/JSONTest.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/JSONTest.cpp b/test/JSONTest.cpp index 78ffc6e01e..5de460e90e 100644 --- a/test/JSONTest.cpp +++ b/test/JSONTest.cpp @@ -338,6 +338,8 @@ void test_matrix_impl( template void test_matrix(Callable &&callable, std::vector const &...matrix) { + // no std::forward, callable is called multiple times, so the impl takes + // a simple reference test_matrix_impl(callable, std::tuple<>(), matrix...); } } // namespace auxiliary @@ -378,13 +380,14 @@ void json_short_modes( auto explicitly_templated = iteration.meshes["explicitly_templated"]; Dataset ds2 = ds1; - ds2.options = backend + R"(.dataset.mode = "template")"; + ds2.options = + R"({")" + backend + R"(": {"dataset": {"mode": "template"}}})"; explicitly_templated.resetDataset(ds2); auto explicitly_not_templated = iteration.meshes["explicitly_not_templated"]; Dataset ds3 = ds1; - ds3.options = backend + R"(.dataset.mode = "dataset")"; + ds3.options = R"({")" + backend + R"(": {"dataset": {"mode": "dataset"}}})"; explicitly_not_templated.resetDataset(ds3); auto undefined_dataset = iteration.meshes["undefined_dataset"]; @@ -445,11 +448,13 @@ void json_short_modes( { REQUIRE(j["data"] == nlohmann::json::array_t{0, 0, 0, 0, 0}); } + // `data` key, `datatype` key, and `attributes` key REQUIRE(j.size() == 3); }; auto verify_template_dataset = [](nlohmann::json const &j) { REQUIRE(j["datatype"] == "INT"); REQUIRE(j["extent"] == nlohmann::json::array_t{5}); + // `extent` key, `datatype` key, and `attributes` key REQUIRE(j.size() == 3); };