/ components / unity / include / unity_config.h
unity_config.h
 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_COLOR
25  #define UNITY_OUTPUT_COLOR
26  #endif
27  
28  #define UNITY_EXCLUDE_TIME_H
29  
30  
31  void unity_flush(void);
32  void unity_putc(int c);
33  void unity_gets(char* dst, size_t len);
34  void unity_exec_time_start(void);
35  void unity_exec_time_stop(void);
36  uint32_t unity_exec_time_get_ms(void);
37  
38  #define UNITY_OUTPUT_CHAR(a)    unity_putc(a)
39  #define UNITY_OUTPUT_FLUSH()    unity_flush()
40  #define UNITY_EXEC_TIME_START() unity_exec_time_start()
41  #define UNITY_EXEC_TIME_STOP()  unity_exec_time_stop()
42  #define UNITY_EXEC_TIME_MS()    unity_exec_time_get_ms()
43  
44  #ifdef CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER
45  
46  #include "unity_test_runner.h"
47  
48  #endif //CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER
49  
50  #ifdef CONFIG_UNITY_ENABLE_FIXTURE
51  #include "unity_fixture_extras.h"
52  #endif // CONFIG_UNITY_ENABLE_FIXTURE
53  
54  // shorthand to check esp_err_t return code
55  #define TEST_ESP_OK(rc) TEST_ASSERT_EQUAL_HEX32(ESP_OK, rc)
56  #define TEST_ESP_ERR(err, rc) TEST_ASSERT_EQUAL_HEX32(err, rc)
57  
58  #endif //UNITY_CONFIG_H