aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.ucl/tests/boolean.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/boolean.cc
parent639b270eed81f7c2627d810057d188e2e8ee67f9 (diff)
downloadnihil-8cbb82a1f6eb6605a4615d30922b777e7bf1e4d8.tar.gz
nihil-8cbb82a1f6eb6605a4615d30922b777e7bf1e4d8.tar.bz2
nihil.ucl: add map<>
Diffstat (limited to 'nihil.ucl/tests/boolean.cc')
-rw-r--r--nihil.ucl/tests/boolean.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/nihil.ucl/tests/boolean.cc b/nihil.ucl/tests/boolean.cc
index b0b3b58..ed5e1d7 100644
--- a/nihil.ucl/tests/boolean.cc
+++ b/nihil.ucl/tests/boolean.cc
@@ -46,13 +46,10 @@ TEST_CASE("ucl: boolean: parse", "[ucl]")
{
using namespace std::literals;
- auto input = "value = true"sv;
- auto obj = nihil::ucl::parse(input);
-
- auto v = obj.lookup("value");
- REQUIRE(v);
- REQUIRE(v->key() == "value");
- REQUIRE(object_cast<nihil::ucl::boolean>(*v).value() == true);
+ auto obj = nihil::ucl::parse("value = true"sv);
+ auto v = obj["value"];
+ REQUIRE(v.key() == "value");
+ REQUIRE(object_cast<nihil::ucl::boolean>(v) == true);
}
TEST_CASE("ucl: boolean: emit", "[ucl]")