78 Commits

Author SHA1 Message Date
5ee55fefda Fix missing TEST_ASSERT_EACH_EQUAL_HEX_MESSAGE 2017-10-30 17:44:32 -07:00
b119919c4f Add 64-bit comparison asserts 2017-09-20 18:26:17 -05:00
91bcbe186d Add 'greater/less or equal to' asserts on integers
Make all comparison operators on integers available
2017-09-20 18:24:23 -05:00
f2fdf1a133 Added Greater than and Less than asserts from other PR 2017-05-13 15:59:51 -04:00
0dddf498c2 also update strings to support each element of an array. 2017-03-21 23:57:15 -04:00
a11a13750d Added memory each equal assertion 2017-03-21 18:28:49 -04:00
d8d67a708c Added each_equal assertions for float and double 2017-03-21 17:05:19 -04:00
7fe31915d0 Added some tests to prove this works. Still work in progress 2017-03-21 14:37:52 -04:00
41ee499e63 Tiny tweaks to make Unity fit in more smoothly with Ceedling 2017-03-13 16:46:41 -04:00
5449f1e4d1 Condense all longjmp calls into TEST_ABORT()
The setjmp calls are all in TEST_PROTECT() already
2017-01-14 10:41:03 -06:00
b0870ec8b9 Merge branch 'feature/print-floats'
Fix new type name conflicts

Conflicts:
	src/unity.c
	src/unity_internals.h
2016-12-15 21:15:30 -06:00
8e31f5d869 Revised internal type naming scheme to better sandbox Unity away from everything else. Sure, short was nice, but not at the expense of naming collisions. 2016-11-29 08:38:51 -05:00
47f6a85b8c Make UnityPrintFloat on by default
Remove UNITY_FLOAT_VERBOSE entirely, add option UNITY_EXCLUDE_FLOAT_PRINT
Remove some questionable float casts from doubles
Default to Round Ties to Even behavior, add option to Round Ties Away from Zero
2016-11-19 13:52:24 -06:00
28c94bd403 Remove references to UNITY_EXCLUDE_SIZEOF, rework config header 2016-08-25 08:48:29 -05:00
f05385250c - Document new define in unity.h. Will still need to be added to real docs 2016-07-08 16:10:14 -04:00
61dd3f181b Change comments style in unity and test runner to compile with std=c89 2016-05-15 14:35:50 +01:00
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
0137f4a8c2 Add option to print FAILED instead of FAIL during the summary
For easier automation and searching for a test suite failure
2016-04-27 21:00:04 -05: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
433ee63575 Added ability to finish test immediately with a pass condition by using TEST_PASS 2016-02-24 16:00:55 -05: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
0c9fc9bb33 add prototypes for setUp and tearDown to unity.h 2015-10-27 18:47:31 -07:00
bc8533836b add C++ guards in unity.h 2015-10-27 18:46:59 -07:00
1273112a05 MISRA rule 19.10: parentheses around macro params
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.
2015-10-14 17:19:26 -05:00
f4292f6df5 Added back TEST_ASSERT_EQUAL_STRING_MESSAGE() which was (accidentally?) removed some time ago. 2015-07-15 13:27:15 +03:00
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
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
3ca172edbb moved things that should be in internals into internals. 2014-07-29 15:08:49 -04:00
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
9fe750ba89 finish cleaning up floating point support
added macros for IS_DETERMINATE and IS_NOT_DETERMINATE
2014-07-21 16:37:18 -04:00
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
e83439528b Make life easier for those creating their own runners:
* Add UNITY_BEGIN and UNITY_END macros to simplify usage
* Improve RUN_TEST to make line_num optional where possible
2014-07-01 10:13:45 -04:00
bc251726b6 Add: Additional documentation for Unity configuration options. 2012-12-03 11:36:45 -06:00
5853e24e1a Added _MESSAGE versions of asserts for floating point specials. 2012-10-31 08:17:10 +00:00
b9b18bf547 Added new asserts to check for plus/minus infinity and NaN. 2012-10-30 17:08:43 +00:00
152e78a4a8 - cleaned up pointer support to handle arrays and to give error when you have an illegal configuration
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@135 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-05-14 15:52:52 +00:00
504bf2edee - fixed conditional self-tests
- rolled in DOUBLE support from Mark Vismer (thanks!)

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@134 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-05-03 11:05:56 +00:00
44fa5bef55 - removed TEST_CASE(...) macro from Unity because it's not compatible with a number of compilers. User will need to define it themselves to use it. (it's an empty define anyway)
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@117 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-02-04 19:50:49 +00:00
6787ada5ad - NOTE: now you need to define UNITY_SUPPORT_TEST_CASES to use TEST_CASE. This is to avoid problems with compilers that don't support varargs in macros.
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@116 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-01-24 12:57:50 +00:00
780c17d017 - updated unity test runner generator to support parameterized tests optionally.
- updated docs to better discuss generator options.

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@104 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-11-26 19:37:22 +00:00
f2ce354f99 - cleaned up test runner problems. again getting ready to support parameterized tests
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@103 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-11-10 16:15:09 +00:00
7ecafcbe5c - revert last change until I figure out what I screwed up
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@102 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-11-10 15:35:57 +00:00
953b55c7e3 - made RUN_TEST so that it doesn't require a custom runTest by default
- updated generator to lay simple foundation for parameterized test support

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@101 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-11-10 14:53:34 +00:00
8177f62867 made unity internally consistent with fail and ignore macros having/not having message parameters
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@87 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-07-30 22:39:52 +00:00
0cd87b0a2e - fixed a silly mistake where TEST_IGNORE was accepting a message argument when only TEST_IGNORE_MESSAGE should have been
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@86 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-07-30 11:41:20 +00:00
a9ccd245b0 - added 64 bit support
- organized targets into a subdirectory
- cleaned up testing so floats and 64-bit ints are only tested if enabled


git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@85 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-07-28 01:06:21 +00:00
9909bfe235 robustified null pointer handling for array handling
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@78 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-06-24 04:45:31 +00:00
cae66a0054 - added special handlers for int and uint types for when it's important that you have the right size (like INT8_ARRAY)
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@75 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-06-09 01:36:55 +00:00
c3f5b23660 - added string array support
- laid foundation for smarter array size handling for integer types

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@74 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-06-06 23:24:36 +00:00