3#include <catch2/catch_all.hpp>
7TEST_CASE(
"Error::from<T>()",
"[Protocol][Protocol::Message]")
9 auto identifier = GENERATE(
"x",
"it",
"long_identifier");
10 auto description = GENERATE(
"hello world",
"error description");
12 auto value = GENERATE(
38TEST_CASE(
"Error::from<InMessage>()",
"[Protocol][Protocol::Message]")
40 auto identifier = GENERATE(
"x",
"it",
"long_identifier");
41 auto description = GENERATE(
"hello world",
"error description");
44 auto value = GENERATE(
Protocol error message representation.
std::variant< Assignment, Inquiry, Command > InMessage
Variant type representing any incoming message.
std::variant< int, double, std::string > protocol_value_t
Variant type representing protocol values that can be one of several types.
Represents an assignment operation in the protocol.
Represents a command invocation in the protocol.
static Error from(const T &msg, const std::string &description)
Creates an error from a specific incoming message type.
Represents a value inquiry in the protocol.
irsol::protocol::InMessage inquiryInMessage(inquiry)
irsol::protocol::InMessage commandInMessage(command)
CHECK(result.identifier==identifier)
irsol::protocol::InMessage assignmentInMessage(assignment)
irsol::protocol::Assignment assignment