|
@@ -161,11 +161,11 @@ SCENARIO("Integration test of Transport layer", "[integration, transport]")
|
|
"\x7b\x49\xfa\x72", 34u);
|
|
"\x7b\x49\xfa\x72", 34u);
|
|
THEN("The shellmatta responds to the command")
|
|
THEN("The shellmatta responds to the command")
|
|
{
|
|
{
|
|
- char *dummyData = (char*)"\x01\x01\x00\x2f\x00\x00\x01\x01"
|
|
|
|
|
|
+ char *dummyData = (char*)"\x01\x01\x00\x2f\x00\x01\x01\x01"
|
|
"doSomething argument - length: 20"
|
|
"doSomething argument - length: 20"
|
|
"\r\n"
|
|
"\r\n"
|
|
"shellmatta->"
|
|
"shellmatta->"
|
|
- "\xc8\xae\xc0\x56";
|
|
|
|
|
|
+ "\x4c\x9f\xd9\xa7";
|
|
|
|
|
|
CHECK(write_length == 59u);
|
|
CHECK(write_length == 59u);
|
|
REQUIRE(memcmp(write_data, dummyData, 59) == 0);
|
|
REQUIRE(memcmp(write_data, dummyData, 59) == 0);
|
|
@@ -184,21 +184,21 @@ SCENARIO("Integration test of Transport layer", "[integration, transport]")
|
|
"\xad\x33\x31\xcc", 26u);
|
|
"\xad\x33\x31\xcc", 26u);
|
|
THEN("The shellmatta responds multiple telegrams")
|
|
THEN("The shellmatta responds multiple telegrams")
|
|
{
|
|
{
|
|
- char *dummyData = (char*)"\x01\x01\x00\xff\x00\x00\x01\x01"
|
|
|
|
|
|
+ char *dummyData = (char*)"\x01\x01\x00\xff\x00\x01\x01\x01"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very"
|
|
"This is my very very very"
|
|
- "\x0f\x90\xc0\xfd"
|
|
|
|
- "\x01\x01\x00\x7f\x00\x00\x01\x02"
|
|
|
|
|
|
+ "\x00\x9c\x41\xe1"
|
|
|
|
+ "\x01\x01\x00\x7f\x00\x01\x01\x02"
|
|
" very large payload\r\n"
|
|
" very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"\r\n"
|
|
"\r\n"
|
|
"shellmatta->"
|
|
"shellmatta->"
|
|
- "\x00\xc9\x5d\x37";
|
|
|
|
|
|
+ "\x39\x75\x0d\x6b";
|
|
|
|
|
|
CHECK(write_length == 406u);
|
|
CHECK(write_length == 406u);
|
|
REQUIRE(memcmp(write_data, dummyData, 406u) == 0);
|
|
REQUIRE(memcmp(write_data, dummyData, 406u) == 0);
|
|
@@ -217,21 +217,21 @@ SCENARIO("Integration test of Transport layer", "[integration, transport]")
|
|
"\xad\x33\x31\xcc", 26u);
|
|
"\xad\x33\x31\xcc", 26u);
|
|
THEN("The shellmatta responds multiple telegrams")
|
|
THEN("The shellmatta responds multiple telegrams")
|
|
{
|
|
{
|
|
- char *dummyData = (char*)"\x01\x01\x00\xff\x00\x00\x01\x01"
|
|
|
|
|
|
+ char *dummyData = (char*)"\x01\x01\x00\xff\x00\x01\x01\x01"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very"
|
|
"This is my very very very"
|
|
- "\x0f\x90\xc0\xfd"
|
|
|
|
- "\x01\x01\x00\x7f\x00\x00\x01\x02"
|
|
|
|
|
|
+ "\x00\x9c\x41\xe1"
|
|
|
|
+ "\x01\x01\x00\x7f\x00\x01\x01\x02"
|
|
" very large payload\r\n"
|
|
" very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"This is my very very very very large payload\r\n"
|
|
"\r\n"
|
|
"\r\n"
|
|
"shellmatta->"
|
|
"shellmatta->"
|
|
- "\x00\xc9\x5d\x37";
|
|
|
|
|
|
+ "\x39\x75\x0d\x6b";
|
|
|
|
|
|
CHECK(write_length == 406u);
|
|
CHECK(write_length == 406u);
|
|
REQUIRE(memcmp(write_data, dummyData, 406u) == 0);
|
|
REQUIRE(memcmp(write_data, dummyData, 406u) == 0);
|
|
@@ -248,11 +248,11 @@ SCENARIO("Integration test of Transport layer", "[integration, transport]")
|
|
shellmatta_processData(handle, (char*)"doSomething argument\r\n", 22u);
|
|
shellmatta_processData(handle, (char*)"doSomething argument\r\n", 22u);
|
|
THEN("The shellmatta responds to the command")
|
|
THEN("The shellmatta responds to the command")
|
|
{
|
|
{
|
|
- char *dummyData = (char*)"\x01\x01\x00\x2f\x00\x00\x01\x01"
|
|
|
|
|
|
+ char *dummyData = (char*)"\x01\x01\x00\x2f\x00\x01\x01\x01"
|
|
"doSomething argument - length: 20"
|
|
"doSomething argument - length: 20"
|
|
"\r\n"
|
|
"\r\n"
|
|
"shellmatta->"
|
|
"shellmatta->"
|
|
- "\xc8\xae\xc0\x56"
|
|
|
|
|
|
+ "\x4c\x9f\xd9\xa7"
|
|
"doSomething argument - length: 20\r\n"
|
|
"doSomething argument - length: 20\r\n"
|
|
"shellmatta->";
|
|
"shellmatta->";
|
|
|
|
|
|
@@ -280,11 +280,11 @@ SCENARIO("Integration test of Transport layer", "[integration, transport]")
|
|
THEN("The shellmatta returns the data")
|
|
THEN("The shellmatta returns the data")
|
|
{
|
|
{
|
|
|
|
|
|
- char *dummyData = (char*)"\x01\x01\x00\x2f\x00\x00\x01\x01"
|
|
|
|
|
|
+ char *dummyData = (char*)"\x01\x01\x00\x2f\x00\x01\x01\x01"
|
|
"doSomething argument - length: 20"
|
|
"doSomething argument - length: 20"
|
|
"\r\n"
|
|
"\r\n"
|
|
"shellmatta->"
|
|
"shellmatta->"
|
|
- "\xc8\xae\xc0\x56";
|
|
|
|
|
|
+ "\x4c\x9f\xd9\xa7";
|
|
|
|
|
|
CHECK(write_length == 59u);
|
|
CHECK(write_length == 59u);
|
|
REQUIRE(memcmp(write_data, dummyData, 59) == 0);
|
|
REQUIRE(memcmp(write_data, dummyData, 59) == 0);
|
|
@@ -300,8 +300,8 @@ SCENARIO("Integration test of Transport layer", "[integration, transport]")
|
|
"\xc4\xa3\x07\xe6", 12u);
|
|
"\xc4\xa3\x07\xe6", 12u);
|
|
THEN("The valid Sequence counter is returned")
|
|
THEN("The valid Sequence counter is returned")
|
|
{
|
|
{
|
|
- char *dummyData = (char*)"\x01\x01\x81\x00\x00\x00\x01\x01"
|
|
|
|
- "\xb4\x0f\x12\xe9";
|
|
|
|
|
|
+ char *dummyData = (char*)"\x01\x01\x81\x00\x00\x01\x01\x01"
|
|
|
|
+ "\xb5\xcd\x78\xde";
|
|
|
|
|
|
CHECK(write_length == 12);
|
|
CHECK(write_length == 12);
|
|
REQUIRE(memcmp(write_data, dummyData, 12) == 0);
|
|
REQUIRE(memcmp(write_data, dummyData, 12) == 0);
|
|
@@ -316,8 +316,8 @@ SCENARIO("Integration test of Transport layer", "[integration, transport]")
|
|
"\xc4\xa3\x07\xe6", 12u);
|
|
"\xc4\xa3\x07\xe6", 12u);
|
|
THEN("The next Sequence counter is returned")
|
|
THEN("The next Sequence counter is returned")
|
|
{
|
|
{
|
|
- char *dummyData = (char*)"\x01\x01\x81\x00\x00\x00\x02\x02"
|
|
|
|
- "\x06\x2b\x10\x90";
|
|
|
|
|
|
+ char *dummyData = (char*)"\x01\x01\x81\x00\x00\x01\x02\x02"
|
|
|
|
+ "\x07\xe9\x7a\xa7";
|
|
|
|
|
|
CHECK(write_length == 12);
|
|
CHECK(write_length == 12);
|
|
REQUIRE(memcmp(write_data, dummyData, 12) == 0);
|
|
REQUIRE(memcmp(write_data, dummyData, 12) == 0);
|
|
@@ -366,11 +366,11 @@ SCENARIO("Integration test of Transport layer with mandatory transport layer", "
|
|
shellmatta_processData(handle, (char*)"doSomething argument\r\n", 22u);
|
|
shellmatta_processData(handle, (char*)"doSomething argument\r\n", 22u);
|
|
THEN("The shellmatta responds only to the first command - and waits for a new telegram to start")
|
|
THEN("The shellmatta responds only to the first command - and waits for a new telegram to start")
|
|
{
|
|
{
|
|
- char *dummyData = (char*)"\x01\x01\x00\x2f\x00\x00\x01\x01"
|
|
|
|
|
|
+ char *dummyData = (char*)"\x01\x01\x00\x2f\x00\x01\x01\x01"
|
|
"doSomething argument - length: 20"
|
|
"doSomething argument - length: 20"
|
|
"\r\n"
|
|
"\r\n"
|
|
"shellmatta->"
|
|
"shellmatta->"
|
|
- "\xc8\xae\xc0\x56";
|
|
|
|
|
|
+ "\x4c\x9f\xd9\xa7";
|
|
|
|
|
|
CHECK(write_length == 59);
|
|
CHECK(write_length == 59);
|
|
CHECK(memcmp(write_data, dummyData, write_length) == 0);
|
|
CHECK(memcmp(write_data, dummyData, write_length) == 0);
|