valgrind why
fsfw/fsfw/pipeline/pr-development There was a failure building this commit Details

This commit is contained in:
Robin Müller 2022-02-01 18:04:08 +01:00
parent 368481f88b
commit acbc2cd749
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 4 additions and 2 deletions

View File

@ -59,9 +59,11 @@ TEST_CASE( "Command Executor" , "[cmd-exec]") {
REQUIRE(outputBuffer.getAvailableReadData() == 12);
uint8_t readBuffer[32];
REQUIRE(outputBuffer.readData(readBuffer, 12) == HasReturnvaluesIF::RETURN_OK);
std::string readString(reinterpret_cast<char*>(readBuffer));
std::string cmpString = "Hello World\n";
int cmpResult = strcmp(reinterpret_cast<char*>(readBuffer), cmpString.c_str());
CHECK(cmpResult == 0);
//int cmpResult = strcmp(reinterpret_cast<char*>(readBuffer), cmpString.c_str());
int cmpResult = (readString == cmpString);
CHECK(cmpResult);
outputBuffer.deleteData(12, true);
// Test more complex command
result = cmdExecutor.load("ping -c 1 localhost", false, false);