From 80486240c63ec8b3fd6878976b8da27bdcdbe7b7 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 21 Aug 2017 22:31:28 +0800 Subject: [PATCH] unity: log error codes as hex Error codes are normally defined as hex numbers in header files, so changing the assert macro to print them as hex as well. --- tools/unit-test-app/components/unity/include/unity_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/unit-test-app/components/unity/include/unity_config.h b/tools/unit-test-app/components/unity/include/unity_config.h index bacb79e00..90be3a90f 100644 --- a/tools/unit-test-app/components/unity/include/unity_config.h +++ b/tools/unit-test-app/components/unity/include/unity_config.h @@ -81,8 +81,8 @@ void unity_run_all_tests(); */ // shorthand to check esp_err_t return code -#define TEST_ESP_OK(rc) TEST_ASSERT_EQUAL_INT32(ESP_OK, rc) -#define TEST_ESP_ERR(err, rc) TEST_ASSERT_EQUAL_INT32(err, rc) +#define TEST_ESP_OK(rc) TEST_ASSERT_EQUAL_HEX32(ESP_OK, rc) +#define TEST_ESP_ERR(err, rc) TEST_ASSERT_EQUAL_HEX32(err, rc) #endif //UNITY_CONFIG_H