...
This commit is contained in:
26
tests/adc_netmsg_test.cpp
Normal file
26
tests/adc_netmsg_test.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||
#include <doctest/doctest.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "../net/adc_netmessage.h"
|
||||
|
||||
using namespace adc;
|
||||
|
||||
TEST_CASE("[ADC NET MESSAGE]")
|
||||
{
|
||||
AdcKeyParamNetMessage<> msg;
|
||||
|
||||
std::string_view bytes{"SET POS 1 2 3 4 5"};
|
||||
|
||||
std::cout << "BYTES: [" << bytes << "]\n";
|
||||
|
||||
msg.setFromBytes(bytes.begin(), bytes.end());
|
||||
|
||||
std::string key, pars;
|
||||
msg.key(key);
|
||||
std::cout << "KEY: [" << key << "]\n";
|
||||
|
||||
msg.paramsBytes(pars, 1);
|
||||
// msg.paramsBytes(pars);
|
||||
std::cout << "PARS BYTES: [" << pars << "]\n";
|
||||
}
|
||||
Reference in New Issue
Block a user