Skip to content

Commit 5b6e631

Browse files
apply extern C for mixed C C++ test cases
1 parent 0401f8e commit 5b6e631

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

code/logic/fossil/test/testing.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,13 @@ void fossil_test_print_stack_trace(stack_frame_t *stack_trace);
362362
*
363363
* @param name The name of the test group.
364364
*/
365+
#ifdef __cplusplus
366+
#define _FOSSIL_TEST_GROUP(name) \
367+
extern "C" void name##_test_group(fossil_test_env_t *_env)
368+
#else
365369
#define _FOSSIL_TEST_GROUP(name) \
366370
void name##_test_group(fossil_test_env_t *_env)
371+
#endif
367372

368373
/**
369374
* @brief Macro to export a test group.

0 commit comments

Comments
 (0)