IRSOL
C++ code implementing socket server for interacting with Baumer camera.
test_command.cpp
Go to the documentation of this file.
2
3#include <catch2/catch_all.hpp>
4#include <memory>
5#include <string>
6
7TEST_CASE("Command::Command()", "[Protocol][Protocol::Message]")
8{
9
10 {
11 auto identifier = GENERATE(
12 "x", "it", "long_identifier", "sequence_identifier[4]", "nested_sequence_identifier[4][423]");
13
14 irsol::protocol::Command m(identifier);
15 CHECK(m.identifier == identifier);
16 }
17 {
18 auto identifier =
19 GENERATE("", " ", " x", "2", "4x", "identifier with space", "identifier-with-dash");
20 CHECK_THROWS_AS(irsol::protocol::Command(identifier), std::invalid_argument);
21 }
22}
Protocol command representation.
std::string identifier
The variable or parameter name being assigned.
Represents a command invocation in the protocol.
Definition command.hpp:33
CHECK(m.identifier==identifier)
irsol::protocol::Assignment m(identifier, value)
CHECK_THROWS_AS(irsol::protocol::Assignment(identifier, value), std::invalid_argument)
TEST_CASE("Pixel<T>::max())", "[PixelFormat]")