From 8cbb82a1f6eb6605a4615d30922b777e7bf1e4d8 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Sun, 22 Jun 2025 23:25:26 +0100 Subject: nihil.ucl: add map<> --- nihil.ucl/tests/real.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'nihil.ucl/tests/real.cc') diff --git a/nihil.ucl/tests/real.cc b/nihil.ucl/tests/real.cc index d97e767..4bd9b3f 100644 --- a/nihil.ucl/tests/real.cc +++ b/nihil.ucl/tests/real.cc @@ -48,12 +48,10 @@ TEST_CASE("ucl: real: parse", "[ucl]") { using namespace std::literals; - auto input = "value = 42.1"sv; - auto obj = nihil::ucl::parse(input); - auto v = obj.lookup("value"); - REQUIRE(v); - REQUIRE(v->key() == "value"); - REQUIRE_THAT(object_cast(*v).value(), + auto obj = nihil::ucl::parse("value = 42.1"sv); + auto v = obj["value"]; + REQUIRE(v.key() == "value"); + REQUIRE_THAT(object_cast(v).value(), Catch::Matchers::WithinRel(42.1)); } -- cgit v1.2.3