From f41970666675f873d7c1075efd192f22df8d17fe Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Sun, 22 Jun 2025 14:46:53 +0100 Subject: add nihil.ucl (incomplete) --- nihil.ucl/tests/object.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nihil.ucl/tests/object.cc (limited to 'nihil.ucl/tests/object.cc') diff --git a/nihil.ucl/tests/object.cc b/nihil.ucl/tests/object.cc new file mode 100644 index 0000000..f9cef9f --- /dev/null +++ b/nihil.ucl/tests/object.cc @@ -0,0 +1,22 @@ +/* + * This source code is released into the public domain. + */ + +#include + +#include + +import nihil.ucl; + +TEST_CASE("ucl object: get_ucl_object", "[ucl]") +{ + auto obj = nihil::ucl::integer(42); + + REQUIRE(obj.get_ucl_object() != nullptr); + static_assert(std::same_as<::ucl_object_t *, + decltype(obj.get_ucl_object())>); + + auto const cobj = obj; + static_assert(std::same_as<::ucl_object_t const *, + decltype(cobj.get_ucl_object())>); +} -- cgit v1.2.3