25a3666e47
Add Unity Fixture to the travisCI build, and use Makefile builds
...
Prevent changes in core Unity from silently breaking Fixture
2016-04-24 12:07:51 -05:00
5ceab7193f
Update Version
2016-04-14 21:22:25 -04:00
1c7e1bd5a2
Merge pull request #183 from xor-gate/master
...
Fix #182 , remove redundant function declarations (Thanks xor-gate!)
2016-04-13 07:44:59 -04:00
720ea42a82
tests/testunity.c: Fix after redundant declarations fix
2016-04-13 12:59:31 +02:00
a27b03c79a
UNITY_OUTPUT_CHAR can emit a redundant declaration, we scope the extern declartion to the unity.c
2016-04-13 12:19:04 +02:00
8c37d7b98a
Fix #182 , remove redundant function declarations
2016-04-13 11:33:57 +02:00
64d98f240a
Merge pull request #177 from jsalling/refactor/unreachable
...
Fix unreachable code in Unity on fully covered switch statements
2016-03-02 17:21:36 -05:00
13c99601a7
Add a value to FLOAT_TRAIT enum to enforce use of default case in switches
...
Revert the previous commit. Add tests for extended enum cases.
Fix crash due to accessing 'trait_names' array out of bounds.
Adding an extra invalid value to the end of an enum causes '-Wswitch' flag
to warn unless there is a switch default case - also enabled by '-Wall'.
2016-03-02 14:56:09 -06:00
7a0875f4f3
Fix unreachable code in Unity on fully covered switch statements
...
The clang compiler warns here with -Wunreachable-code
The enum's switch statement covers all cases, so default is unused
Leave the break in the code as a comment, to be more clear
The history is this default case was added in f6bb7162 - compiler warning.
Then the break was added in c6dc96f3.
2016-03-02 14:22:01 -06:00
e84a7c0a7d
Merge pull request #179 from jsalling/feature/unity-coverage
...
Add Makefile with coverage target for Unity
2016-03-02 07:06:22 -05:00
da0f2a0a74
Add Makefile with coverage target for Unity
...
Unity is at 92% coverage now
Run 'make -s' to see coverage information for unity.c
Run 'make uncovered' to get missing lines output
2016-03-01 21:24:53 -06:00
295a7906fe
Merge pull request #178 from jsalling/feature/coverage-fixture
...
100% code coverage for Unity Fixture
2016-03-01 06:56:01 -05:00
94fc68942b
100% code coverage for Unity Fixture
...
Add tests for uncovered lines
2016-02-29 23:39:03 -06:00
cc0f58cfbc
Create coverage target in Makefile to output statement coverage with gcov
2016-02-29 23:25:39 -06:00
ce6f4737b2
Merge pull request #175 from jsalling/feature/C89-build
...
Fix C89 warnings about variables at top of scope, enums, variadic macros
2016-02-29 16:59:40 -05:00
4187255a8f
Merge pull request #176 from jsalling/refactor/ignored-tests
...
Clean up IgnoreTest function in Fixture
2016-02-29 16:56:58 -05:00
3bb51bd740
Fix C89 warnings about variables at top of scope, enums, variadic macros
...
Add extern UnityFixture in internals header. Add C89 target in Makefile
clang will show these warnings but can suppress "//" with -Wno-comment.
2016-02-26 20:51:04 -06:00
bcf6515329
Protect test runner generator against characters in strings that look like comments or functions
2016-02-25 15:35:45 -05:00
f8d5f0eee6
Clean up Ignore Test function in Fixture
...
By removing the call to the Conclude function the code is simplified
and doesn't depend on global state updates. Tests that are ignored
after the testBody is called still output the right EOL.
2016-02-25 13:12:22 -06:00
915e3fb9fc
Merge pull request #174 from jsalling/feature/using-spy-macro
...
Delete function call syntax from Spy detect macros
2016-02-25 13:05:12 -05:00
f55bed38a6
Delete function call syntax from Spy detect macros
...
This fixes #168 . See that github.com issue for more discussion.
Allows the tests to build when putchar() is defined as a macro
with parenthesis around it, as in the ARM embedded gcc compiler.
2016-02-25 10:41:04 -06:00
49e0c87841
Add output styler for junit output (Thanks Kris Boultbee)
2016-02-25 11:34:46 -05:00
324000d8e2
Merge pull request #173 from jsalling/rename/template
...
Rename template for testing to be more fitting
2016-02-24 21:57:23 -05:00
862d5d7d3d
Rename template for testing to be more fitting
2016-02-24 20:24:14 -06:00
a7f81e8a04
Merge pull request #172 from pacheco017/UnityPrintFloat-overflow-fixes
...
UnityPrintFloat overflow fixes. (Thanks pacheco017!)
2016-02-24 20:16:45 -05:00
c17705358f
UnityPrintFloat(): bigger temporal buffer
...
With a buffer long enough, no truncation should be neccesary to format floats.
Buffer length is user settable by defining UNITY_VERBOSE_NUMBER_MAX_LENGTH,
otherwise a sensible default is used based on desired precision.
See: http://stackoverflow.com/a/7235717
2016-02-24 19:58:54 -03:00
50259a1329
Fix UnityPrintFloat() buffer overflow
...
UnityPrintFloat() overflowed with some inputs (eg. FLT_MAX)
2016-02-24 19:47:58 -03:00
433ee63575
Added ability to finish test immediately with a pass condition by using TEST_PASS
2016-02-24 16:00:55 -05:00
3a775ccd70
Merge pull request #171 from jsalling/feature/fix-linux-warnings
...
Fix additional primitive type conversion warnings on Linux
2016-02-24 06:46:29 -05:00
3faa143f21
Fix additional primitive type conversion warnings on Linux
...
Using gcc 4.8 on Ubuntu 14
2016-02-23 14:46:52 -06:00
7fff3fc034
Merge pull request #170 from jsalling/feature/fix-compiler-warnings
...
Clean up int conversion warnings in Fixture
2016-02-23 06:38:57 -05:00
4cc964962b
Merge pull request #169 from jsalling/feature/remove-wrappers
...
Delete unused Fixture internals functions for failure, ignore, & test counts
2016-02-22 07:12:49 -05:00
f31667ad18
Merge pull request #166 from jsalling/bugfix/line-numbers
...
Bugfix - line numbers output by Fixture memory checks
2016-02-18 14:18:20 -05:00
3826b3a1e1
Merge pull request #164 from jsalling/bugfix/conversion-warnings
...
Clean up int conversion warnings in core Unity using a 32-bit build
2016-02-18 07:02:08 -05:00
05066785e1
Merge pull request #163 from jsalling/feature/move-makefile-output
...
Move Makefile output to build/ directory in Fixture (Thanks jsalling!)
2016-02-18 06:50:15 -05:00
2337d6e837
Merge pull request #165 from jsalling/cleanup/file-permissions
...
Permissions changed back from -x for testunity.c (Thanks jsalling!)
2016-02-18 06:47:09 -05:00
2107e7060b
Variables used in Fixture tests should be static
...
Gets rid of warnings about extern with clang's -Weverything
2016-02-17 22:20:56 -06:00
7b0f3cf986
Clean up conversion warnings in Fixture
...
Turn on -Wconversion in Makefile, fix all warnings
2016-02-17 22:17:05 -06:00
c3371664ba
Clean up int conversion warnings in core Unity using a 32-bit build
...
To expose warnings use -Wconversion -m32, and *not* -D UNITY_SUPPORT_64
In 32-bit mode, the variable and parameter are the same width, so sign
conversion is implicit. In 64-bit, implicit conversion is clean.
2016-02-12 15:59:46 -06:00
773c7f1770
Permissions changed to -x for testunity.c, reverts part of 51af84a7
2016-02-12 13:25:14 -06:00
ad14ccf26b
Add strict compiler flags to Makefile and a 'clean' target
...
Comment out -Wconversion for now, since the build would fail
2016-02-09 14:24:00 -06:00
5e7780fd60
Delete unused internals functions for failure, ignore, & test counts.
...
These wrapper functions should be in Unity core if warranted.
Use the Unity struct directly for access, or consider macro functions
2016-02-09 10:55:07 -06:00
943fef8a17
Fix printing the test line number for leak detection failures in Fixture
...
The old failure would print the line in unity_fixture.c, not very useful.
Now using CurrentTestLineNumber, which is better.
2016-02-09 10:39:22 -06:00
36ee2d2111
Add test for setting max number of pointers in Fixture
2016-02-09 10:36:33 -06:00
822a537d2e
Remove opaque typedef from UnityFixture struct, as done in core Unity
2016-02-08 16:53:10 -06:00
6b664fc803
Pass through correct line info on failures in Fixture pointer setting
2016-02-08 16:52:26 -06:00
4c384658e5
Move makefile output to build/ dir for Fixture testing
2016-02-05 21:48:23 -06:00
189085d03a
Check for writes to guard space on malloc'd buffers in Fixture
...
There was already some space reserved as a guard, added check for writes
before the beginning of the buffer. Did not change the 'overrun' message.
Underrun buffer writes are likely to be a more rare case.
2016-02-05 21:31:38 -06:00
7943c766b9
Merge pull request #161 from jsalling/feature/fixture-remove-dependencies
...
Feature - remove dependencies from Fixture, add internal heap option (Wow! Thanks jsalling!)
2016-02-03 21:00:24 -05:00
955b221218
Add configuration option UNITY_EXCLUDE_STDLIB_MALLOC to Fixture
...
This feature removes the dependency on malloc/free for constrained
embedded systems without a heap. It uses a static heap inside
Unity Fixture. Setting UNITY_INTERNAL_HEAP_SIZE_BYTES sizes the heap.
Add tests for new option, add targets to makefile for running tests.
UNITY_FIXTURE_MALLOC for Fixture use only, remove from unity_output_Spy.c.
2016-02-01 23:54:06 -06:00