]> granicus.if.org Git - esp-idf/commitdiff
unity: log error codes as hex
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 21 Aug 2017 14:31:28 +0000 (22:31 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Tue, 29 Aug 2017 00:35:23 +0000 (08:35 +0800)
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

index bacb79e00b3b9472360423623293dffceb412256..90be3a90fd42fb7edc25bce0a3e9a3bb211d966c 100644 (file)
@@ -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