it actually was an uninitialized array
This commit is contained in:
parent
30687f84c8
commit
e0c50477cb
@ -57,13 +57,11 @@ TEST_CASE( "Command Executor" , "[cmd-exec]") {
|
|||||||
sizesFifo.retrieve(&readBytes);
|
sizesFifo.retrieve(&readBytes);
|
||||||
REQUIRE(readBytes == 12);
|
REQUIRE(readBytes == 12);
|
||||||
REQUIRE(outputBuffer.getAvailableReadData() == 12);
|
REQUIRE(outputBuffer.getAvailableReadData() == 12);
|
||||||
uint8_t readBuffer[32];
|
uint8_t readBuffer[32] = {};
|
||||||
REQUIRE(outputBuffer.readData(readBuffer, 12) == HasReturnvaluesIF::RETURN_OK);
|
REQUIRE(outputBuffer.readData(readBuffer, 12) == HasReturnvaluesIF::RETURN_OK);
|
||||||
std::string readString(reinterpret_cast<char*>(readBuffer));
|
std::string readString(reinterpret_cast<char*>(readBuffer));
|
||||||
std::string cmpString = "Hello World\n";
|
std::string cmpString = "Hello World\n";
|
||||||
//int cmpResult = strcmp(reinterpret_cast<char*>(readBuffer), cmpString.c_str());
|
CHECK(readString == cmpString);
|
||||||
int cmpResult = (readString == cmpString);
|
|
||||||
CHECK(cmpResult);
|
|
||||||
outputBuffer.deleteData(12, true);
|
outputBuffer.deleteData(12, true);
|
||||||
// Test more complex command
|
// Test more complex command
|
||||||
result = cmdExecutor.load("ping -c 1 localhost", false, false);
|
result = cmdExecutor.load("ping -c 1 localhost", false, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user