27 lines
569 B
C++
27 lines
569 B
C++
#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";
|
|
}
|