//----------------------------------------------------------------------------- // ___ __ _ _ // / _ \__ _ _ __ ___ ___ / /(_)_ __ | | __ // / /_)/ _` | '__/ __|/ _ \/ / | | '_ \| |/ / // / ___/ (_| | | \__ \ __/ /__| | | | | < // \/ \__,_|_| |___/\___\____/_|_| |_|_|\_\ . // //----------------------------------------------------------------------------- // Author: Kurt Sassenrath // Module: msgpack // // Unpacker tests for strings. // // Copyright (c) 2023 Kurt Sassenrath. // // License TBD. //----------------------------------------------------------------------------- #include "test_unpacker.h" using namespace boost::ut; suite unpack_string_types = [] { "unpacker::unpack"_test = [] { static constexpr auto payload = test::make_bytes(0xa2, 'H', 'i'); msgpack::unpacker unpacker(payload); expect(type_check_unpacker(unpacker)); expect(unpacker.unpack() == "Hi"); expect(unpacker.unpack() == tl::make_unexpected(msgpack::error::end_of_message)); }; };