1 /* IDF-specific additions to "Unity Fixture" */
2 #pragma once
3 
4 #ifndef CONFIG_IDF_TARGET
5 
6 /* A shorthand for running one test group from the main function */
7 #define UNITY_MAIN(group_) do { \
8     const char* argv[] = { "test", "-v" }; \
9     const int argc = sizeof(argv)/sizeof(argv[0]); \
10     int rc = UnityMain(argc, argv, TEST_ ## group_ ## _GROUP_RUNNER); \
11     printf("\nTests finished, rc=%d\n", rc); \
12     exit(rc); \
13 } while(0)
14 
15 #else // CONFIG_IDF_TARGET
16 
17 /* A shorthand for running one test group from the main function */
18 #define UNITY_MAIN(group_) do { \
19     const char* argv[] = { "test", "-v" }; \
20     const int argc = sizeof(argv)/sizeof(argv[0]); \
21     int rc = UnityMain(argc, argv, TEST_ ## group_ ## _GROUP_RUNNER); \
22     printf("\nTests finished, rc=%d\n", rc); \
23 } while(0)
24 
25 #endif // CONFIG_IDF_TARGET
26