Roland Stahn
6a1d2e8d44
Fix LESS_OR_EQUAL_MESSAGE asserts for HEX32/HEX64
...
Macros TEST_ASSERT_LESS_OR_EQUAL_HEX32_MESSAGE() and TEST_ASSERT_LESS_OR_EQUAL_HEX64_MESSAGE() need to be mapped to UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEXnn() instead of UNITY_TEST_ASSERT_SMALLER_THAN_HEXnn()
2018-07-25 22:57:44 +02:00
Mark VanderVoord
774da10e00
Merge pull request #296 from jlindgren90/master
...
Allow suiteSetUp() and suiteTearDown() to be provided as normal C functions (Thanks @jlindgren90 )
2017-11-04 09:04:53 -04:00
John Lindgren
629b86d541
Merge unity_setup.h into unity.h.
2017-11-01 11:36:26 -04:00
Kate Hart
5ee55fefda
Fix missing TEST_ASSERT_EACH_EQUAL_HEX_MESSAGE
2017-10-30 17:44:32 -07:00
jsalling
b119919c4f
Add 64-bit comparison asserts
2017-09-20 18:26:17 -05:00
jsalling
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
John Lindgren
2593c31bb7
Allow suiteSetUp() and suiteTearDown() to be provided as normal C functions.
...
This is simpler and more flexible than embedding C code in the Ruby options
(:suite_setup and :suite_teardown). However, support for :suite_setup and
:suite_teardown is kept for backwards compatibility.
Several configurations are possible:
1. :suite_setup and :suite_teardown options provided and used.
2. :suite_setup and :suite_teardown options not provided (nil):
2a. Weak symbols not supported; suiteSetUp() and suiteTearDown() are not called.
It would be simpler to make user-provided functions mandatory in this case,
but it could break some pre-existing test suites.
2b. Weak symbols are supported and the stub implementations of suiteSetUp() and
suiteTearDown() are called if there are no user-provided functions.
2c. Weak symbols are supported but overridden by user-provided suiteSetUp() and
suiteTearDown() functions.
2017-09-13 18:12:23 -04:00
Dom Postorivo
f2fdf1a133
Added Greater than and Less than asserts from other PR
2017-05-13 15:59:51 -04:00
Mark VanderVoord
0dddf498c2
also update strings to support each element of an array.
2017-03-21 23:57:15 -04:00
Mark VanderVoord
a11a13750d
Added memory each equal assertion
2017-03-21 18:28:49 -04:00
Mark VanderVoord
d8d67a708c
Added each_equal assertions for float and double
2017-03-21 17:05:19 -04:00
Mark VanderVoord
7fe31915d0
Added some tests to prove this works. Still work in progress
2017-03-21 14:37:52 -04:00
Mark VanderVoord
41ee499e63
Tiny tweaks to make Unity fit in more smoothly with Ceedling
2017-03-13 16:46:41 -04:00
jsalling
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
jsalling
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
Mark VanderVoord
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
jsalling
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
jsalling
28c94bd403
Remove references to UNITY_EXCLUDE_SIZEOF, rework config header
2016-08-25 08:48:29 -05: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
Andrzej Bieniek
61dd3f181b
Change comments style in unity and test runner to compile with std=c89
2016-05-15 14:35:50 +01: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
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
Mark VanderVoord
a7f81e8a04
Merge pull request #172 from pacheco017/UnityPrintFloat-overflow-fixes
...
UnityPrintFloat overflow fixes. (Thanks pacheco017!)
2016-02-24 20:16:45 -05:00
Matias Devenuta
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
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
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
Andy Isaacson
0c9fc9bb33
add prototypes for setUp and tearDown to unity.h
2015-10-27 18:47:31 -07:00
Andy Isaacson
bc8533836b
add C++ guards in unity.h
2015-10-27 18:46:59 -07:00
Jeremy Hannon
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
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
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
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
3ca172edbb
moved things that should be in internals into internals.
2014-07-29 15:08:49 -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
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
Bryan A. Jones
bc251726b6
Add: Additional documentation for Unity configuration options.
2012-12-03 11:36:45 -06:00
Ross Ryles
5853e24e1a
Added _MESSAGE versions of asserts for floating point specials.
2012-10-31 08:17:10 +00:00
Ross Ryles
b9b18bf547
Added new asserts to check for plus/minus infinity and NaN.
2012-10-30 17:08:43 +00:00
mvandervoord
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
mvandervoord
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
mvandervoord
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
mvandervoord
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
mvandervoord
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
mvandervoord
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
mvandervoord
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
mvandervoord
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
mkarlesky
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
mvandervoord
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