From 030fc1de19b9d99d87e4ae39efbf2ce0933e65f6 Mon Sep 17 00:00:00 2001 From: Snaipe Date: Sat, 5 Sep 2015 23:41:01 +0200 Subject: [PATCH] Added MSVC glue for missing section symbols --- src/report.c | 14 ++++++++++++++ src/runner.c | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/src/report.c b/src/report.c index 3b709e0..2f37fa0 100644 --- a/src/report.c +++ b/src/report.c @@ -45,6 +45,20 @@ static inline void nothing() {} } \ } +#ifdef _MSC_VER +f_report_hook SECTION_START_(HOOK_SECTION(PRE_ALL)); +f_report_hook SECTION_START_(HOOK_SECTION(PRE_SUITE)); +f_report_hook SECTION_START_(HOOK_SECTION(PRE_INIT)); +f_report_hook SECTION_START_(HOOK_SECTION(PRE_TEST)); +f_report_hook SECTION_START_(HOOK_SECTION(ASSERT)); +f_report_hook SECTION_START_(HOOK_SECTION(THEORY_FAIL)); +f_report_hook SECTION_START_(HOOK_SECTION(TEST_CRASH)); +f_report_hook SECTION_START_(HOOK_SECTION(POST_TEST)); +f_report_hook SECTION_START_(HOOK_SECTION(POST_FINI)); +f_report_hook SECTION_START_(HOOK_SECTION(POST_SUITE)); +f_report_hook SECTION_START_(HOOK_SECTION(POST_ALL)); +#endif + IMPL_CALL_REPORT_HOOKS(PRE_ALL); IMPL_CALL_REPORT_HOOKS(PRE_SUITE); IMPL_CALL_REPORT_HOOKS(PRE_INIT); diff --git a/src/runner.c b/src/runner.c index 37342a3..16b0405 100644 --- a/src/runner.c +++ b/src/runner.c @@ -44,6 +44,11 @@ #include "extmatch.h" #endif +#ifdef _MSC_VER +struct criterion_test SECTION_START_(cr_tst); +struct criterion_suite SECTION_START_(cr_sts); +#endif + IMPL_SECTION_LIMITS(struct criterion_test, cr_tst); IMPL_SECTION_LIMITS(struct criterion_suite, cr_sts);