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
ed2842fd4d
Merge pull request #160 from pmendham/master
...
Added support for mocks in sub-directories. (Thanks pmendham! This is helpful!)
2016-02-01 18:20:37 -05:00
099b0db22b
Updated mock determination code to be more efficient applying the
...
feedback from @mvandervoord (Thanks).
2016-02-01 22:48:23 +00:00
ccb29e80c2
Add NULL safety checks to Fixture allocation functions
...
Consistent use of one-liners and NULL
2016-01-31 23:15:00 -06:00
e2ad88b9c0
Add checks for NULL return value to Fixture tests and spy
...
Help failures in the spy by adding filename and message to output
2016-01-31 22:44:45 -06:00
63a0b98faf
Remove atoi() dependency, only need stdlib.h in Fixture for malloc
...
For redefinition of UNITY_FIXTURE_MALLOC/...FREE use both or replace both.
Clean up whitespace, remaining void*, and comment.
2016-01-30 22:35:59 -06:00
4ea563e65b
Added support for mocks in sub-directories.
...
This supports mock headers of the form:
#include "some/dir/MockMyCode.h"
Where the mock name is actually MockMyCode.
I *think* this is the most common scenario when working with mocks
in subdirectories but if not this could be modified to support
alternate schemes.
2016-01-28 20:45:58 +00:00
f36bd5f521
Merge pull request #159 from pmendham/master
...
Removed unecessary output when generating a test runner (Thanks pmendham!)
2016-01-27 09:52:01 -05:00
9a9d6c75cf
Removed unecessary output when generating a test runner
2016-01-27 14:42:29 +00:00
2179e54d6d
Merge pull request #158 from jsalling/bugfix/fixture-rakefile-fails
...
Fixture rakefile has a conflict defining UNITY_OUTPUT_CHAR
2016-01-24 09:55:50 -05:00
044a1f517d
Merge pull request #156 from pmendham/master
...
Two small changes to runner generation
2016-01-20 09:08:18 -05:00
55a75ded7a
Improved header file generation.
...
Changed the guard syntax as it was cumbersome for header files in deep
sub-directories. Added framework/mock includes to make the header file
stand alone. Made sure that a valid prototype was generated in the case of
no arguments (void).
2016-01-20 13:48:15 +00:00
2e4799111c
Added a command line option to change the name of main.
...
This allows alternative entry points. This is intended for the
integration of the unit test into a larger system or for it to be used with
a platform/OS which requires an application entry point other than main. At
the moment there is no way to change the type signature.
2016-01-20 13:45:25 +00:00
cd472439bf
Fixture rakefile has a conflict defining UNITY_OUTPUT_CHAR
...
Make core Unity rakefile helper follow Fixture define procedure.
This commit reverts parts of 36e2ca1.
2016-01-19 23:47:32 -06:00
34a30f8e98
Delete dangling function prototype in Fixture internals
2016-01-19 21:47:40 -06:00
a7b60dfc88
Consistent use of * in types in the Fixture, whitespace only
2016-01-19 21:47:32 -06:00
693417847b
Remove unnecessary stdio.h dependency and clean up Fixture
...
Delete unused variables and empty functions
Make setUp & tearDown (used in Unity core) optionally defined
if 'weak' linking is present
2016-01-15 22:35:43 -06:00
10146392c8
Merge pull request #154 from jsalling/bugfix/AssertNumbersWithin-overflow
...
Bugfix for UnityAssertNumbersWithin()
2016-01-07 20:45:35 -05:00
33325f4a0b
More fixes to line endings
2016-01-07 14:20:59 -05:00
d1111d92af
Merge pull request #152 from jsalling/feature/fixture-ignore-tests-require-spy
...
Fixture - require spy or else ignore tests
2016-01-07 07:56:47 -05:00
716f88caca
Merge pull request #153 from jsalling/refactor/trailing-whitespace
...
Fix trailing whitespace CRLF, no code changes
2016-01-06 20:41:34 -05:00
4108319007
Fix for overflow issue in UnityAssertNumbersWithin()
...
Make subtraction result unsigned, change prototype & casts in internals.
If "actual - expected" overflowed, it wrapped to a negative number,
but would fit in an unsigned type, example is INT_MAX - (-1) = INT_MIN
For correctness, 'delta' should be unsigned too. Passing in a negative
number always passed. The delta can be between INT_MAX & UINT_MAX.
2016-01-06 17:41:06 -06:00
8ca3062ad4
Adding tests for overflow when calling UnityAssertNumbersWithin()
...
32 or 64 bit test will fail if compiled with -m32 or -m64, repectively
on clang or gcc
Fixes to the failures will follow
2016-01-06 17:41:02 -06:00
04adb2d2c9
Fix trailing whitespace CRLF, no code changes
...
Now that the project is using .gitattributes, get rid of CRLF in the repo.
2016-01-06 17:23:43 -06:00
edfba3793e
Merge pull request #151 from jsalling/bugfix/add-tests-for-printing-numbers
...
Add tests for printing numbers, interface for spying on output strings (Thanks! I like this idea!)
2016-01-05 19:17:52 -05:00
f52538d401
- fix whitespace
...
- tweak docs
2016-01-04 19:30:38 -05:00
0decf21b9d
Merge pull request #149 from jsalling/refactor/fixture-cleanup
...
Refactor Fixture, no EOL with ignored tests, add a Makefile for Fixture tests
2016-01-04 18:46:22 -05:00
eac0943f53
Merge pull request #148 from jsalling/master
...
Fix printing of largest negative number
2016-01-04 18:42:24 -05:00
a61ba9d43f
Merge pull request #150 from pacheco017/unity-float-verbose-includes
...
Include <stdio.h> (for sprintf) when using UNITY_FLOAT_VERBOSE (thanks pacheco017!)
2015-12-28 13:17:28 -05:00
fe4001f876
Include <stdio.h> (for sprintf) when using UNITY_FLOAT_VERBOSE
2015-12-28 15:04:27 -03:00
c5bfe0e100
Fixture C99 compliance on tricky macros for Spy & match core Unity version
...
Add CFLAGS in Fixture Makefile to catch C99 rules with '-pedantic'
2015-12-22 12:40:31 -06:00
5cc5e3473d
Add MACROs to check if tests are built using the Output Spy
...
Ignore tests that need the Spy if we are not building with it
2015-12-21 14:37:23 -06:00
36e2ca192b
Adding -D UNITY_OUTPUT_CHAR=putcharSpy to testing build targets
...
Updated clang and gcc targets. Fixed spelling of LIMITS, which breaks the
gcc_auto_sizeof.yml build.
Commented -Wunreachable-code, Unity won't build on OSX clang with it,
error in unity.c:769 & 932: 'default: break;' case.
2015-12-21 11:39:50 -06:00
a3d81dfa41
Add tests for printing numbers using a compile time replacement spy
...
If Unity core is compiled with UNITY_OUTPUT_CHAR = putcharSpy, these tests
will run, otherwise they are ignored and print a message
Includes an implementation of putcharSpy, which allows checking the I/O
from Unity during a test. Follows closely from the Fixture spy
Tricky macros determine if putcharSpy is injected
2015-12-20 22:00:02 -06:00