Mark VanderVoord
4f2cdb03fc
Merge pull request #185 from jsalling/feature/output-declaration
...
Add Unity Fixture to the travisCI build and restore header declaration of UNITY_OUTPUT_CHAR
2016-04-26 22:53:41 -04:00
Jerry Jacobs
6a02f7e51c
Fixup issues when compiling with clang -Wmissing-variable-declarations
2016-04-26 14:17:10 +02:00
jsalling
573481729b
Revert commits 720ea42 and a27b03c which broke the Fixture build
...
These were aimed at preventing the internals header from declaring
a prototype for 'int UNITY_OUTPUT_CHAR(int);'. The second part fixed
an omitted declaration in the tests caused by the first commit.
Will replace the default behavior & add an option for this in next commit
2016-04-24 23:30:01 -05:00
Jerry Jacobs
720ea42a82
tests/testunity.c: Fix after redundant declarations fix
2016-04-13 12:59:31 +02:00
Jerry Jacobs
8c37d7b98a
Fix #182 , remove redundant function declarations
2016-04-13 11:33:57 +02:00
jsalling
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
jsalling
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
Mark VanderVoord
bcf6515329
Protect test runner generator against characters in strings that look like comments or functions
2016-02-25 15:35:45 -05:00
jsalling
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
Mark VanderVoord
433ee63575
Added ability to finish test immediately with a pass condition by using TEST_PASS
2016-02-24 16:00:55 -05:00
jsalling
773c7f1770
Permissions changed to -x for testunity.c, reverts part of 51af84a7
2016-02-12 13:25:14 -06:00
jsalling
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
Mark VanderVoord
10146392c8
Merge pull request #154 from jsalling/bugfix/AssertNumbersWithin-overflow
...
Bugfix for UnityAssertNumbersWithin()
2016-01-07 20:45:35 -05:00
Mark VanderVoord
33325f4a0b
More fixes to line endings
2016-01-07 14:20:59 -05:00
jsalling
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
jsalling
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
jsalling
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
jsalling
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
Mark VanderVoord
28195baaba
- Made some tweaks to the way the new detail handling works (to make it look nicer, mostly)
...
- Fixed a big ugly error in the fancy RUN_TEST handler
2015-12-10 18:12:45 -05:00
Mark VanderVoord
dfbf21c2a3
- Added ability to tack on details to a Unity failure message.
2015-12-10 13:06:41 -05:00
Mark VanderVoord
c6dc96f387
We're going to use the C99 isinf() and isnan() macros wherever possible now. If your compiler doesn't support this, define UNITY_EXCLUDE_MATH_H and it will go back to the old method
2015-11-13 09:16:42 -05:00
Mark VanderVoord
a7b85335be
the test runner generator now has the ability to also output a header file for the tests, which can get pulled into the test itself if desired.
2015-07-21 15:35:33 -04:00
Mark VanderVoord
ba87d27b77
- switch to old-school hash notation to be backwards compatible with older versions of ruby
2015-07-21 07:35:29 -04:00
Nimrod Zimerman
f4292f6df5
Added back TEST_ASSERT_EQUAL_STRING_MESSAGE() which was (accidentally?) removed some time ago.
2015-07-15 13:27:15 +03:00
Eivind Tagseth
15b367f8d1
Fixed stupid typo
2015-04-23 21:02:05 +02:00
Eivind Tagseth
61c0b0b75c
Added support for TEST_ASSERT_EQUAL_STRING_LEN*
...
Compares two strings until maximum n bytes (i.e. strncmp()).
2015-04-23 15:39:19 +02:00
Greg Williams
89b003ed0b
Removed platform-specific warnings unsupported by GCC
2015-03-12 10:53:44 -04:00
nimrodz
b389c71e71
Added stricter error checks by the compiler, and adapted all impacted code.
...
Primarily -
* Added "static" to static functions.
* Added proper signature with "void" to functions without arguments.
* Marked unused arguments with "(void)".
* Removed entirely unused static functions.
* Added "const" to preserve const-correctness.
* Added function prototypes for external functions.
2015-01-18 00:39:05 +02:00
Greg Williams
28d05e4f33
Fixed tests
2014-11-05 21:57:48 -05:00
Mark McCrum
616dd8bd43
Fixed script unit tests. Fixed generate_test_runner configuration loading
...
- Modified rakefile to look in correct directory for script unit tests
- Updated paths in script unit tests
- Updated 'expectdata' files to match latest version of generated code
- Fixed bug which prevented generate_test_runner from loading config from
yaml file.
2014-10-29 16:10:11 +00:00
Mark VanderVoord
e2d5e1c632
Fixed printability of largest negative value (Thanks SigmaPic!)
2014-09-01 16:44:18 -04:00
Mark VanderVoord
14b074336b
reenable results summary.
...
support tests named spec as well.
clean up UnityBegin to make us not have to dig inside it to inject the filename.
Add UNITY_OUTPUT_START() and UNITY_OUTPUT_COMPLETE() for future use.
2014-07-30 22:12:49 -04:00
Mark VanderVoord
bff1fc68cb
rearranged project to centralize all self-test stuff under test directory. only pull in includes when required.
2014-07-30 10:14:02 -04:00
Mark VanderVoord
93db16b6dc
- add the rest of the WITHIN integer options (why were those missing? laziness?)
...
- rename the custom FLOAT_TRAIT type because the old name was poor
2014-07-22 13:43:06 -04:00
Mark VanderVoord
9fe750ba89
finish cleaning up floating point support
...
added macros for IS_DETERMINATE and IS_NOT_DETERMINATE
2014-07-21 16:37:18 -04:00
Mark VanderVoord
96155881ed
- rework to not bother with any of the ever-changing test frameworks in Ruby (sigh) for self-testing
...
- started working on cleaner floating point support. more coming.
2014-07-21 14:00:53 -04:00
Mark VanderVoord
fe2c691e9d
Clean up many warnings. add clang_strict target to help uncover warnings
2014-05-22 13:43:52 -04:00
Mark VanderVoord
1cf02f8bf3
support cmock's need to destroy all of its memory at the end of the suite
2014-05-21 19:29:44 -04:00
Mark VanderVoord
d4197dacd0
There was no reason that CMock init and destroy calls should be in the protected blocks. teardown is more flexible if verify is called afterwards.
2014-04-21 16:55:12 -04:00
Mark VanderVoord
f1c778e100
Fixed initialization of data structure by just doing it manually instead of statically (goodbye compiler warnings!)
2014-03-07 15:17:25 -05:00
Mark VanderVoord
72c55e0266
- Fixed script tests to match Shelly's changes
2013-09-22 11:53:48 -04:00
Mark VanderVoord
79ea2883a9
Merge pull request #46 from canton7/feature/hex-array-test-fixes
...
Fix unit tests for TEST_ASSERT_EQUAL_HEX_ARRAY on 16-bit architectures (Thanks Antony!)
2013-09-17 04:19:10 -07:00
Antony Male
2b484e4239
Fix tests testing TEST_ASSERT_EQUAL_MEMORY_ARRAY on 16-bit platforms
...
The tests which exercise TEST_ASSERT_EQUAL_MEMORY_ARRAY use int arrays,
and hard-code the size of each element as 4 bytes. This is of course
untrue on 16-bit platforms.
Replace this hard-coded value with sizeof(int).
2013-06-28 11:12:59 +01:00
Antony Male
318dc8f35a
Fix unit tests for TEST_ASSERT_EQUAL_HEX_ARRAY on 16-bit architectures
...
Previously, TEST_ASSERT_EQUAL_HEX_ARRAY was being called, and passed
arrays of type 'unsigned int'. TEST_ASSERT_EQUAL_HEX_ARRAY is an alias
for TEST_ASSERT_EQUAL_HEX32_ARRAY in *all* cases (and is documented as
such), while 'unsigned int' is 16 bits on some platforms. Unsurprisingly
this caused some tests to fail.
Fix by replacing the 'unsigned int' declarations with '_UU32'.
2013-06-28 10:59:23 +01:00
Bryan A. Jones
f73c5fa606
Fix: - Modify tests to compile under MSVC++ EE 2008
...
- Change type of floating-point constants to single/double precision
as appropriate.
2012-11-26 11:29:47 -06:00
Ross Ryles
2ab2fef60a
Array comparisons of floating point types fail if any values are NaN or infinite.
2012-10-31 12:34:30 +00:00
Ross Ryles
b9b18bf547
Added new asserts to check for plus/minus infinity and NaN.
2012-10-30 17:08:43 +00:00
Ross Ryles
b14819bc79
Expanded NaN and Infinity handling to doubles.
2012-10-30 16:12:50 +00:00
Ross Ryles
899f2f2fab
UnityAssertFloatsWithin now fails any test where either a NaN or Infinite value is passed as expected or actual.
2012-10-30 16:00:00 +00:00
Ross Ryles
ae18c560bd
Added more tests for TEST_ASSERT_EQUAL_FLOAT with NaNs.
2012-10-30 15:22:28 +00:00