#include #include #include #include #include #include "write_and_read.hpp" namespace test_byte_container_concepts { TEST(generic, test_byte_container_concepts) { // Test various container types std::vector vec_uint8{1, 2, 3, 4}; std::vector vec_char{'a', 'b', 'c'}; std::array arr_uint8{1, 2, 3, 4}; std::string str_data{"hello"}; std::string_view str_view{"world"}; std::array arr_byte{std::byte{5}, std::byte{4}, std::byte{3}, std::byte{2}, std::byte{1}}; std::span byte_span = arr_byte; // Test with concepts static_assert(rfl::concepts::ByteLike); static_assert(rfl::concepts::ByteLike); static_assert(rfl::concepts::ByteLike); static_assert(rfl::concepts::ByteLike); static_assert(!rfl::concepts::ByteLike); static_assert(!rfl::concepts::ByteLike); static_assert(rfl::concepts::ContiguousByteContainer); static_assert(rfl::concepts::ContiguousByteContainer); static_assert(rfl::concepts::ContiguousByteContainer); static_assert(rfl::concepts::ContiguousByteContainer); static_assert(rfl::concepts::ContiguousByteContainer); static_assert(rfl::concepts::ContiguousByteContainer); static_assert(rfl::concepts::ContiguousByteContainer); static_assert( rfl::concepts::MutableContiguousByteContainer); static_assert( rfl::concepts::MutableContiguousByteContainer); static_assert( rfl::concepts::MutableContiguousByteContainer); static_assert( rfl::concepts::MutableContiguousByteContainer); static_assert( !rfl::concepts::MutableContiguousByteContainer); static_assert( rfl::concepts::MutableContiguousByteContainer); static_assert( rfl::concepts::MutableContiguousByteContainer); static_assert( rfl::concepts::BackInsertableByteContainer); static_assert(rfl::concepts::BackInsertableByteContainer); static_assert( !rfl::concepts::BackInsertableByteContainer); static_assert(rfl::concepts::BackInsertableByteContainer); static_assert( !rfl::concepts::BackInsertableByteContainer); static_assert( !rfl::concepts::BackInsertableByteContainer); static_assert( !rfl::concepts::BackInsertableByteContainer); } } // namespace test_byte_container_concepts