aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.ucl/tests/integer.cc
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-06-22 23:25:26 +0100
committerLexi Winter <lexi@le-fay.org>2025-06-22 23:25:26 +0100
commit8cbb82a1f6eb6605a4615d30922b777e7bf1e4d8 (patch)
treec79559e81aa9570e22a13ec0439ff7eee05f9ffd /nihil.ucl/tests/integer.cc
parent639b270eed81f7c2627d810057d188e2e8ee67f9 (diff)
downloadnihil-8cbb82a1f6eb6605a4615d30922b777e7bf1e4d8.tar.gz
nihil-8cbb82a1f6eb6605a4615d30922b777e7bf1e4d8.tar.bz2
nihil.ucl: add map<>
Diffstat (limited to 'nihil.ucl/tests/integer.cc')
-rw-r--r--nihil.ucl/tests/integer.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/nihil.ucl/tests/integer.cc b/nihil.ucl/tests/integer.cc
index c7db851..ad513ca 100644
--- a/nihil.ucl/tests/integer.cc
+++ b/nihil.ucl/tests/integer.cc
@@ -46,12 +46,10 @@ TEST_CASE("ucl: parse: integer", "[ucl]")
{
using namespace std::literals;
- auto input = "value = 42"sv;
- auto obj = nihil::ucl::parse(input);
- auto v = obj.lookup("value");
- REQUIRE(v);
- REQUIRE(v->key() == "value");
- REQUIRE(object_cast<nihil::ucl::integer>(*v).value() == 42);
+ auto obj = nihil::ucl::parse("value = 42"sv);
+ auto v = obj["value"];
+ REQUIRE(v.key() == "value");
+ REQUIRE(object_cast<nihil::ucl::integer>(v) == 42);
}
TEST_CASE("ucl: integer: emit", "[ucl]")