diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-06-22 14:46:53 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-06-22 14:46:53 +0100 |
| commit | f41970666675f873d7c1075efd192f22df8d17fe (patch) | |
| tree | 09b8c4da91a7efeb37a92d322d3e729e4dbde659 /nihil.ucl/tests/object.cc | |
| parent | d27d1302d1fa1b96bf8f53f17fce947f19d21330 (diff) | |
| download | nihil-f41970666675f873d7c1075efd192f22df8d17fe.tar.gz nihil-f41970666675f873d7c1075efd192f22df8d17fe.tar.bz2 | |
add nihil.ucl (incomplete)
Diffstat (limited to 'nihil.ucl/tests/object.cc')
| -rw-r--r-- | nihil.ucl/tests/object.cc | 22 |
1 files changed, 22 insertions, 0 deletions
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 <catch2/catch_test_macros.hpp> + +#include <ucl.h> + +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())>); +} |
