aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.ucl/tests/integer.cc
diff options
context:
space:
mode:
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]")