Fix shadow warnings in CUnit tests

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
This commit is contained in:
Jeroen Koekkoek 2019-08-13 00:32:12 +02:00 committed by eboasson
parent 4e741e9137
commit 93addbbda0
2 changed files with 10 additions and 10 deletions

View file

@ -48,16 +48,16 @@ typedef struct {
void CU_TestProxyName(suite, test)(void); \
\
void CU_TestProxyName(suite, test)(void) { \
cu_data_t data = CU_Fixture(__VA_ARGS__); \
cu_data_t cu_data = CU_Fixture(__VA_ARGS__); \
\
if (data.init != NULL) { \
data.init(); \
if (cu_data.init != NULL) { \
cu_data.init(); \
} \
\
CU_TestName(suite, test)(); \
\
if (data.fini != NULL) { \
data.fini(); \
if (cu_data.fini != NULL) { \
cu_data.fini(); \
} \
} \
\

View file

@ -47,19 +47,19 @@ extern "C" {
void CU_TestProxyName(suite, test)(void); \
\
void CU_TestProxyName(suite, test)(void) { \
cu_data_t data = CU_Fixture(__VA_ARGS__); \
cu_data_t cu_data = CU_Fixture(__VA_ARGS__); \
size_t i, n; \
\
if (data.init != NULL) { \
data.init(); \
if (cu_data.init != NULL) { \
cu_data.init(); \
} \
\
for (i = 0, n = CU_TheoryDataPointsSize(suite, test); i < n; i++) { \
CU_TestName(suite, test) CU_TheoryDataPointsSlice(suite, test, i) ; \
} \
\
if (data.fini != NULL) { \
data.fini(); \
if (cu_data.fini != NULL) { \
cu_data.fini(); \
} \
} \
\