Add sending and receiving test

dependabot/npm_and_yarn/Src/WebController/UI/websocket-extensions-0.1.4
Grzegorz Rychlik 2019-10-29 14:20:51 +01:00
parent bac6392961
commit 456f84338f
1 changed files with 6 additions and 0 deletions

View File

@ -73,6 +73,12 @@ try
json createParams2 = form.FillForm(ch2Args);
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)
{