From 90aa957ca9b7c217af7569009d1675e0f3ff8e9b Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Thu, 26 Jun 2025 20:47:45 +0100 Subject: ucl, config: use monadic error handling more --- nihil.ucl/tests/object.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'nihil.ucl/tests/object.cc') diff --git a/nihil.ucl/tests/object.cc b/nihil.ucl/tests/object.cc index 1bbcf4f..3ad180e 100644 --- a/nihil.ucl/tests/object.cc +++ b/nihil.ucl/tests/object.cc @@ -26,12 +26,19 @@ TEST_CASE("ucl object: compare", "[ucl]") using namespace std::literals; auto obj_41 = nihil::ucl::parse("int = 41;"sv); + REQUIRE(obj_41); + auto obj_42 = nihil::ucl::parse("int = 42;"sv); + REQUIRE(obj_42); + auto obj_42_2 = nihil::ucl::parse("int = 42;"sv); + REQUIRE(obj_42_2); + auto obj_43 = nihil::ucl::parse("int = 43;"sv); + REQUIRE(obj_43); - REQUIRE(obj_42 == obj_42_2); - REQUIRE(obj_42 != obj_43); - REQUIRE(obj_42 < obj_43); - REQUIRE(obj_42 > obj_41); + REQUIRE(*obj_42 == *obj_42_2); + REQUIRE(*obj_42 != *obj_43); + REQUIRE(*obj_42 < *obj_43); + REQUIRE(*obj_42 > *obj_41); } -- cgit v1.2.3