From 368481f88bdfb548e21645508a5f206f7777bfdc Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 1 Feb 2022 14:04:13 +0100 Subject: [PATCH] move strcmp outside of macro --- tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp index 959c3da2b..090d60cbd 100644 --- a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp +++ b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp @@ -60,7 +60,8 @@ TEST_CASE( "Command Executor" , "[cmd-exec]") { uint8_t readBuffer[32]; REQUIRE(outputBuffer.readData(readBuffer, 12) == HasReturnvaluesIF::RETURN_OK); std::string cmpString = "Hello World\n"; - CHECK(strcmp(reinterpret_cast(readBuffer), cmpString.c_str()) == 0); + int cmpResult = strcmp(reinterpret_cast(readBuffer), cmpString.c_str()); + CHECK(cmpResult == 0); outputBuffer.deleteData(12, true); // Test more complex command result = cmdExecutor.load("ping -c 1 localhost", false, false);