From b65a9045741593414f3b245909efabac62de5cce Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Mon, 1 Aug 2022 12:34:43 +0200 Subject: [PATCH] Update unit test meta --- tests/src/unit-meta.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/src/unit-meta.cpp b/tests/src/unit-meta.cpp index a6a1f0015..8d78c00c9 100644 --- a/tests/src/unit-meta.cpp +++ b/tests/src/unit-meta.cpp @@ -28,10 +28,19 @@ TEST_CASE("version information") {"patch", 1} })); - CHECK(j.find("platform") != j.end()); - CHECK(j.at("compiler").find("family") != j.at("compiler").end()); - CHECK(j.at("compiler").find("version") != j.at("compiler").end()); - CHECK(j.at("compiler").find("c++") != j.at("compiler").end()); + CHECK(j.contains("platform")); + CHECK(j.contains("compiler")); + CHECK(j.contains("config")); + + const auto& j_cxx = j["compiler"]; + CHECK(j_cxx.contains("family")); + CHECK(j_cxx.contains("version")); + CHECK(j_cxx.contains("c++")); + CHECK(j_cxx.contains("libc++")); + + const auto& j_lib = j_cxx["libc++"]; + CHECK(j_lib.contains("family")); + CHECK(j_lib.contains("version")); } }