Fix: Declare all variables before statements in a function.

Likewise, place all function prototypes before statements.
     These changes support Microsoft Visual Studio 2008 Express Edition,
       which follows C89-style rules.
This commit is contained in:
Bryan A. Jones
2013-01-11 12:56:15 -06:00
parent cfc35610b4
commit 4817d78de3
2 changed files with 10 additions and 7 deletions
+4 -4
View File
@@ -49,8 +49,8 @@ int UnityMain(int argc, char* argv[], void (*runAllTests)());
void TEST_##group##_##name##_run()
#define RUN_TEST_CASE(group, name) \
DECLARE_TEST_CASE(group, name);\
TEST_##group##_##name##_run();
{ DECLARE_TEST_CASE(group, name);\
TEST_##group##_##name##_run(); }
//This goes at the bottom of each test file or in a separate c file
#define TEST_GROUP_RUNNER(group)\
@@ -63,8 +63,8 @@ int UnityMain(int argc, char* argv[], void (*runAllTests)());
//Call this from main
#define RUN_TEST_GROUP(group)\
void TEST_##group##_GROUP_RUNNER();\
TEST_##group##_GROUP_RUNNER();
{ void TEST_##group##_GROUP_RUNNER();\
TEST_##group##_GROUP_RUNNER(); }
//CppUTest Compatibility Macros
#define UT_PTR_SET(ptr, newPointerValue) UnityPointer_Set((void**)&ptr, (void*)newPointerValue)