1 #ifndef UNITY_CONFIG_H 2 #define UNITY_CONFIG_H 3 4 // This file gets included from unity.h via unity_internals.h 5 // It is inside #ifdef __cplusplus / extern "C" block, so we can 6 // only use C features here 7 8 #include <esp_err.h> 9 #include <stddef.h> 10 #include "sdkconfig.h" 11 12 #ifdef CONFIG_UNITY_ENABLE_FLOAT 13 #define UNITY_INCLUDE_FLOAT 14 #else 15 #define UNITY_EXCLUDE_FLOAT 16 #endif //CONFIG_UNITY_ENABLE_FLOAT 17 18 #ifdef CONFIG_UNITY_ENABLE_DOUBLE 19 #define UNITY_INCLUDE_DOUBLE 20 #else 21 #define UNITY_EXCLUDE_DOUBLE 22 #endif //CONFIG_UNITY_ENABLE_DOUBLE 23 24 #ifdef CONFIG_UNITY_ENABLE_64BIT 25 #define UNITY_SUPPORT_64 26 #endif 27 28 #ifdef CONFIG_UNITY_ENABLE_COLOR 29 #define UNITY_OUTPUT_COLOR 30 #endif 31 32 #define UNITY_EXCLUDE_TIME_H 33 34 void unity_flush(void); 35 void unity_putc(int c); 36 void unity_gets(char* dst, size_t len); 37 void unity_exec_time_start(void); 38 void unity_exec_time_stop(void); 39 uint32_t unity_exec_time_get_ms(void); 40 41 #define UNITY_OUTPUT_CHAR(a) unity_putc(a) 42 #define UNITY_OUTPUT_FLUSH() unity_flush() 43 #define UNITY_EXEC_TIME_START() unity_exec_time_start() 44 #define UNITY_EXEC_TIME_STOP() unity_exec_time_stop() 45 #define UNITY_EXEC_TIME_MS() unity_exec_time_get_ms() 46 47 #ifdef CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER 48 49 #include "unity_test_runner.h" 50 51 #endif //CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER 52 53 #ifdef CONFIG_UNITY_ENABLE_FIXTURE 54 #include "unity_fixture_extras.h" 55 #endif // CONFIG_UNITY_ENABLE_FIXTURE 56 57 // shorthand to check esp_err_t return code 58 #define TEST_ESP_OK(rc) TEST_ASSERT_EQUAL_HEX32(ESP_OK, rc) 59 #define TEST_ESP_ERR(err, rc) TEST_ASSERT_EQUAL_HEX32(err, rc) 60 61 #endif //UNITY_CONFIG_H 62