Revert part of commit 77af37ad, code looked like a temporary change
The behavior is back to the original, printing "....!..." in quiet mode
Added an ignored test to Fixture for visual inspection
Delete the { ;} braces and semicolon from UNITY_PRINT_EOL to give it expected
behavior: 1) requires a semicolon 2) works in one-liner if-else statements
If you need "\r\n" for EOL, define as the following to get the same behavior:
do{UNITY_OUTPUT_CHAR('\r'); UNITY_OUTPUT_CHAR('\n');}while(0)
Added parentheses around all macro parameters to resolve MISRA 2004
rule 19.10, "in the definition of a function-like macro, each instance
of a parameter shall be enclosed in parenthesis" as tested with the
IAR EW for 8051 compiler, version 9.20.2.
The only questionable change is in "unity_fixture.h" where the nested
macro DECLARE_TEST_CASE in RUN_TEST_CASE prevents surrounding params
"group" and "name" with parentheses.
However, it appears that macro DECLARE_TEST_CASE isn't used elsewhere,
so I eliminated DECLARE_TEST_CASE and put its expansion directly in
RUN_TEST_CASE. Now the following header files pass rule 19.10:
* unity.h
* unity_internals.h
* unity_fixture.h
For my own project, this change to the Unity test framework allows me
to include my unit test code to be tested against MISRA rules as well,
instead of just production code, to help enforce style and team
guidelines.
At the start of unity_free(), check mem for NULL, and return immediately
if it is, so we don't crash in this case. This mimics the behaviour of
most free() implementations. Closes#135.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
At least in Microchip XC8 compiler, void (*runAllTests)(void) is treated as a different type from void (*runAllTests)().
Fix the definition of UnityMain to match the declaration by making the runAllTests's (void) parameter list explicit.
Likewise, place all function prototypes before statements.
These changes support Microsoft Visual Studio 2008 Express Edition,
which follows C89-style rules.
- fixed obj_file sorting in rakefiles
- gave better anchors for gcc to grab on test pass/fail by breaking them out as functions
- fixed minor type issues
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@137 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
- fixed a few bugs in fixtures to get it to pass against our standard compilers
- added extern of OUTPUT_CHAR method to keep compilers from complaining
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@107 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e