Fixed VC++ not registering any sections and internal crashes due to test data not being zero-filled
This commit is contained in:
parent
ffd6c5a5e7
commit
f35bc3d21c
3 changed files with 4 additions and 3 deletions
|
@ -54,7 +54,7 @@
|
|||
__VA_ARGS__ \
|
||||
)); \
|
||||
SECTION_("cr_tst") \
|
||||
const struct criterion_test IDENTIFIER_(Category, Name, meta) = { \
|
||||
struct criterion_test IDENTIFIER_(Category, Name, meta) = { \
|
||||
#Name, \
|
||||
#Category, \
|
||||
IDENTIFIER_(Category, Name, impl), \
|
||||
|
@ -71,7 +71,7 @@
|
|||
__VA_ARGS__ \
|
||||
)); \
|
||||
SECTION_("cr_sts") \
|
||||
const struct criterion_suite SUITE_IDENTIFIER_(Name, meta) = { \
|
||||
struct criterion_suite SUITE_IDENTIFIER_(Name, meta) = { \
|
||||
#Name, \
|
||||
&SUITE_IDENTIFIER_(Name, extra), \
|
||||
} SECTION_SUFFIX_
|
||||
|
|
|
@ -114,6 +114,7 @@
|
|||
# ifdef __cplusplus
|
||||
# define CRITERION_MAKE_STRUCT(Type, ...) [&]() { \
|
||||
Type t; \
|
||||
std::memset(&t, 0, sizeof (t)); \
|
||||
CR_EXPAND(CRITERION_ADD_PREFIX(t, __VA_ARGS__)) \
|
||||
return t; \
|
||||
}()
|
||||
|
|
|
@ -91,7 +91,7 @@ typedef void (*f_report_hook)();
|
|||
# define ReportHook(Kind) \
|
||||
HOOK_PROTOTYPE_(HOOK_PARAM_TYPE(Kind)); \
|
||||
SECTION_(HOOK_SECTION_STRINGIFY(Kind)) \
|
||||
const f_report_hook HOOK_IDENTIFIER_(func) = \
|
||||
f_report_hook HOOK_IDENTIFIER_(func) = \
|
||||
(f_report_hook) HOOK_IDENTIFIER_(impl) \
|
||||
SECTION_SUFFIX_; \
|
||||
HOOK_PROTOTYPE_
|
||||
|
|
Loading…
Add table
Reference in a new issue