mirror of https://github.com/infosecn1nja/C3.git
Add sending and receiving test
parent
bac6392961
commit
456f84338f
|
@ -73,6 +73,12 @@ try
|
||||||
json createParams2 = form.FillForm(ch2Args);
|
json createParams2 = form.FillForm(ch2Args);
|
||||||
auto ch2 = C3::Linter::MakeDevice(createParams2, chInfo);
|
auto ch2 = C3::Linter::MakeDevice(createParams2, chInfo);
|
||||||
|
|
||||||
|
// test write and read
|
||||||
|
auto data = ByteVector(ByteView(MWR::Utils::GenerateRandomString(64)));
|
||||||
|
channel->OnSendToChannel(data);
|
||||||
|
auto rcv = ch2->OnReceiveFromChannel();
|
||||||
|
if (data != rcv)
|
||||||
|
throw std::exception("data sent and received mismatch");
|
||||||
}
|
}
|
||||||
catch (std::exception & e)
|
catch (std::exception & e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue