Commit Graph

537 Commits

Author SHA1 Message Date
jsalling da7e375cf9 Start building Unity & Fixture with C89 flags in continuous integration
Remove stdint.h from the C89 build due to -pedantic warnings from type
  'long long' and constants like UINTPTR_MAX = 18446744073709551615ULL
2016-08-30 19:57:55 -05:00
jsalling 8beb9715be C89 comment style changes only 2016-08-23 23:10:05 -05:00
Mark VanderVoord 75ad84c92f Merge pull request #209 from jsalling/cleanup/fixture-memory-testing
Cleanup fixture memory testing
2016-08-21 13:49:55 -04:00
jsalling 92f6d5dd08 Verify the tests for Internal Malloc implementation free all the heap
Make it more clear that each test of the internal heap implementation
  should free in LIFO order. Without this check, memory can be stranded
  but still pass.
2016-08-21 11:53:15 -05:00
jsalling d837342b15 Move free() calls before test asserts, add comments to ReallocFail test 2016-08-21 11:45:54 -05:00
jsalling 03ac71b8c9 Reorder free calls to free all memory
The internal malloc must free in LIFO order
2016-08-21 11:27:47 -05:00
Mark VanderVoord f276c79f9b Merge branch 'feature/cmd_line_args' 2016-08-11 13:37:51 -04:00
jsalling 06bae56d30 Revert "Merge pull request #205 from bryongloden/patch-2"
This reverts commit 783fcaea97
 The guard memory bytes should never be freed inside unity_malloc()
2016-08-09 00:51:38 -05:00
Mark VanderVoord 783fcaea97 Merge pull request #205 from bryongloden/patch-2
Update unity_fixture.c (Thanks, Bryon!)
2016-08-02 14:55:42 -04:00
Mark VanderVoord fbc20934e0 Merge pull request #206 from bryongloden/patch-3
Update unity_fixture_Test.c (Thanks Bryon!)
2016-08-02 14:55:00 -04:00
Bryon Gloden, CISSP® 13160e5f1e Update unity_fixture_Test.c
I believe if realloc() returns a pointer to a different location, the old location is freed. However, the pointer 'n1' is not freed if realloc fails to obtain a large enough block of memory and returns NULL. (more details on [StackOverflow](http://stackoverflow.com/a/16676964)).
2016-07-28 17:11:11 -04:00
Bryon Gloden, CISSP® 4fd5f79f28 Update unity_fixture.c
Sorry @mvandervoord -- not your code, your repository 😁

Regarding the double free, cppcheck has a check for that too (just saying) 👍
2016-07-26 19:41:30 -04:00
Bryon Gloden, CISSP® 0737b4117f Update unity_fixture.c
Free guard if UNITY_EXCLUDE_STDLIB_MALLOC is not defined. 👍

Thanks @ for the hint.
2016-07-26 16:02:41 -04:00
Bryon Gloden, CISSP® 094c05e904 Update unity_fixture_Test.c
[../Unity-master/extras/fixture/test/unity_fixture_Test.c:530]: (error) Deallocating a deallocated pointer: n1

This solution from Daniel Fischer was helpful in fixing the error because if realloc returns a pointer to a different location, the old location is freed.

Found by https://github.com/bryongloden/cppcheck
2016-07-26 14:40:00 -04:00
Bryon Gloden, CISSP® b1d8388ab8 Update unity_fixture.c
[../Unity-master/extras/fixture/src/unity_fixture.c:210]: (error) Memory leak: guard

Found by https://github.com/bryongloden/cppcheck
2016-07-26 14:19:41 -04:00
Mark VanderVoord 57676b5edc - Fixed cases with wildcards in file handling. 2016-07-17 19:11:09 -04:00
Mark VanderVoord ad0c07c9ad Merge pull request #204 from dmurdin/tms470
Weak attribute fix for TMS470 Compilers.
2016-07-13 06:49:48 -04:00
Mark VanderVoord cec38d13d3 Merge pull request #203 from dmurdin/pathslash
Escape backslashes for windows paths, fixes #137.
2016-07-13 06:48:57 -04:00
Daniel Murdin f1a4a5e652 Weak attribute fix for TMS470 Compilers.
Change-Id: I901bf192d3c06457d67c6d3a64bdb9aea22c53c2
2016-07-13 10:36:43 +02:00
Daniel Murdin 44c429bd8b Escape backslashes for windows paths, fixes #137.
Change-Id: I2dbae30e21ab31921817f68fd7a5e08d21c76626
2016-07-13 10:31:52 +02:00
Mark VanderVoord 1cecab30e8 - Added alias for filter -n of -f
- Added ability to surround filter strings in either type of quotes
- Added ability to filter on multiple test strings as a comma delimited list
- Added ability to filter on test_file:test_name
- Added ability to use alternate syntax for filter of -f="blah"
2016-07-08 17:35:37 -04:00
Mark VanderVoord f05385250c - Document new define in unity.h. Will still need to be added to real docs 2016-07-08 16:10:14 -04:00
Mark VanderVoord f205b7de05 - If we declare main before the definition, we make sure the arguments match 2016-07-08 16:05:32 -04:00
Mark VanderVoord eba387fa3e - Add tests which prove command line arguments now work with runner. Fixed a few bugs in this area. 2016-06-27 08:41:58 -04:00
Mark VanderVoord 96f51e8530 Updated method of testing generate_test_runner script to be a FUNCTIONAL test instead of a perfect code match. Backfilled most tests and added some coverage not previously present. Still need to test new command line args and a few cmock details. 2016-06-22 20:57:11 -04:00
Mark VanderVoord 4d3d062b56 Adding command line support. Started with -n (test name matching) -x (test name exclusion).
Script verification hasn't been added yet.
2016-06-21 16:07:10 -04:00
Mark VanderVoord b3bc196ab3 making new flush routines work under all defined conditions. 2016-06-21 10:01:34 -04:00
Mark VanderVoord c19b5e20a0 Merge pull request #198 from Liebherr-Nenzing/master
add unity_to_junit.py (Thanks!)
2016-06-21 06:47:29 -04:00
Mathias Giacomuzzi 87af5a1675 add unity_to_junit.py 2016-06-21 09:43:26 +02:00
Mark VanderVoord 7c3d829070 Protect against files without any test output 2016-05-18 07:31:17 -04:00
Mark VanderVoord d86a44b501 Merge pull request #131 from andyhelp/master
Change comments style to compile with std=c89 (Thanks Andy... and everyone else who helped make this decision)
2016-05-15 14:03:38 -04:00
Andrzej Bieniek 83f7d5237b Change example_1 to compile with std=c89 2016-05-15 14:35:56 +01:00
Andrzej Bieniek 61dd3f181b Change comments style in unity and test runner to compile with std=c89 2016-05-15 14:35:50 +01:00
Mark VanderVoord a5a927f43e Merge pull request #193 from wolf99/AddConfigTemplate
Add template example unity_config.h file. (Thanks wolf99!)
2016-05-12 11:08:10 -04:00
Toby d7a371a993 Moved example unity_config.h from src to examples
As recommended in PR #193
2016-05-12 16:00:31 +01:00
Toby 287bcae478 Add template example unity_config.h file 2016-05-11 12:10:55 +01:00
Mark VanderVoord 837c5291fa The class gives back to the community: better documentation produced for the class and now part of the open source project 2016-05-06 11:52:06 -04:00
Mark VanderVoord e3612e9a10 Update Fixtures too. 2016-05-06 10:55:41 -04:00
Mark VanderVoord c5c392b18a update UNITY_OUTPUT_CHAR to not return a value (because we never check it anyway).
add UNITY_OUTPUT_FLUSH to make sure we get the output we need on aborted tests and whatnot.
2016-05-06 10:47:39 -04:00
Mark VanderVoord 7053ef7523 Merge pull request #192 from jsalling/feature/unity-coverage
100% code coverage for Unity project (Thanks jsalling!)
2016-05-04 22:01:13 -04:00
jsalling c5238adab2 100% code coverage for Unity project
Add test for failure count and UnityEnd return value
 Cover printing escape codes with length parameter
 Full statement coverage
2016-05-03 21:58:29 -05:00
jsalling bff491c73c Test strings not equal to NULL when using length parameter 2016-05-03 20:47:00 -05:00
jsalling 7c270e0541 Test that details are printed in a direct TEST_FAIL call 2016-05-03 20:31:37 -05:00
jsalling 4164540333 Test number arrays for two NULL inputs, it should pass
More statement coverage on NULL input feature
2016-05-03 20:26:42 -05:00
jsalling 213e47178c Test string arrays and memory comparison with length 0, it should fail 2016-05-03 20:17:38 -05:00
jsalling a6748f39cd Test number arrays comparison with length 0, it should fail
Get test coverage on this feature for int, float, & double
2016-05-03 20:14:30 -05:00
jsalling 07513dd331 Remove weak linked setup/teardown from coverage build, unreachable & empty
Add config flag for 64-bit, max covered lines even with 32-bit compilers
 Always print uncovered lines, delete separate make target
2016-05-03 20:02:01 -05:00
jsalling b971ec921f Simplify printing StrPointless into a single macro, remove repeated code 2016-05-03 19:52:32 -05:00
jsalling 67a37a4db7 Refactor UnityPrintNumber(), remove unreachable code
Remove what looks like an overflow check. 'divisor' cannot overflow
  since it is the same type as 'number' and cannot be greater.
2016-05-02 23:50:28 -05:00
Mark VanderVoord 0247e34b1f Merge pull request #190 from jsalling/feature/differentiate-final-ouput
Add option to print FAILED instead of FAIL during the summary
2016-04-27 22:45:13 -04:00