diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-06-26 20:47:45 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-06-26 20:47:45 +0100 |
| commit | 90aa957ca9b7c217af7569009d1675e0f3ff8e9b (patch) | |
| tree | e6a61ca2b6928e6414372b9b1484ce80fa2fb0b3 /nihil.ucl/tests/object.cc | |
| parent | 1db86c401df11423c945634d8b2a483e97afa878 (diff) | |
| download | nihil-90aa957ca9b7c217af7569009d1675e0f3ff8e9b.tar.gz nihil-90aa957ca9b7c217af7569009d1675e0f3ff8e9b.tar.bz2 | |
ucl, config: use monadic error handling more
Diffstat (limited to 'nihil.ucl/tests/object.cc')
| -rw-r--r-- | nihil.ucl/tests/object.cc | 15 |
1 files changed, 11 insertions, 4 deletions
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); } |
