#include "check.hpp" #include #include #include using namespace Void::TeamSpeak; static_assert(!std::is_copy_constructible_v); static_assert(std::is_move_constructible_v); static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v().deleteFile("x")), Void::Result::Result>); TEST_CASE(modern_build_command_escapes_fields) { const auto command = buildCommand("sendtextmessage", { {"msg", "hello world|all"}, {"target", "7"}}); CHECK_EQ(command, std::string("sendtextmessage msg=hello\\sworld\\pall target=7")); } TEST_CASE(strong_ids_do_not_implicitly_convert) { const ClientId client{42}; const ChannelId channel{42}; CHECK(client.value == 42); CHECK(channel.value == 42); CHECK(static_cast(client)); CHECK(static_cast(channel)); } TEST_CASE(whisper_targets_report_empty_state) { WhisperTargets targets; CHECK(targets.empty()); targets.clients.push_back(ClientId{7}); CHECK(!targets.empty()); }