1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 16:35:58 +01:00
Commit Graph

70 Commits

Author SHA1 Message Date
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
Ross Ryles
83148364a5 Fix For Issue #10 - TEST_ASSERT_EQUAL_FLOAT doesn't fail if actual value is a NaN. 2012-10-30 09:00:45 +00:00
John Van Enk
aa78d0d500 Merge pull request 'expand_unity_initializer' 2012-10-03 14:37:15 -04:00
John Van Enk
541fb57a31 Switch up the testing strategy to handle funny architectural issues. 2012-10-03 14:17:07 -04:00
John Van Enk
4d7c539715 Merge pull request from 'panx/master'. 2012-10-03 14:00:28 -04:00
John Van Enk
b1a991c6c3 Use a better message and change the test name. 2012-10-03 13:47:18 -04:00
John Van Enk
aaddd1cd80 Add test that will break if the _Unity struct ever changes. 2012-10-03 12:44:02 -04:00
Alex Rodriguez
e95f662683 Fix issue \#7 INTx_WITHIN_MESSAGE() macro
The reason that TEST_ASSERT_xyz_WITHIN_MESSAGE() family of functions
doesn't print any message is because is calling a re-use macro from the
TEST_ASSERT_xyz_WITHIN() family of functions. Due this two functions in
unity.h calls the same function from unity_internals.h, the message is
nullified at this point. The issue is fix by passing _message_ arg to
the 4th argument of *UnityAssertNumbersWithin()* function.
2012-08-28 15:06:09 -07:00
Xiaochen Pan
51af84a727 adding test cases to complete the testing list 2012-08-27 00:36:51 -04: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
7deba78730 - backed out Mike's incorrect changes to generate_test_runner
- made generate_test_runner's two include groups more clearly differentiated
- added negative tests to int16's.

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@133 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-04-28 00:29:20 +00:00
mvandervoord
43b4c94f7b - protect against ints that only have differences in higher nibbles that shouldn't be part of comparison
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@130 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-04-20 11:56:56 +00:00
mvandervoord
02f12f7a4c - fixed pretty-printing error with small uint sizes
- added a couple of user-submitted ports

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@119 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-02-18 02:00:29 +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
3e472491c9 - added ability to parse fun characters like parenthesis in TEST_CASES
- fixed TEST_CASE error

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@115 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-01-22 18:53:23 +00:00
mvandervoord
aca9892418 - fixed yaml load option
- added option to specify includes as <stdlib.h> so that they will get angle brackets instead of ""

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@114 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-01-22 18:20:39 +00:00
mvandervoord
4e4d4291d6 - updated documentation
- parameterized tests now output parameters as part of message


git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@110 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-12-28 15:32:20 +00:00
mvandervoord
57178b9295 - tweaked parameterized tests to be C99 standards compliant
- fixed a few bugs in fixtures to get it to pass against our standard compilers
- added extern of OUTPUT_CHAR method to keep compilers from complaining

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@107 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-12-01 01:56:24 +00:00
mvandervoord
962ce941df - caught up runner generator script tests
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@105 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-11-26 22:27:37 +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
33fa00d518 - added tests for generate_test_runner. other script tests to come
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@97 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-09-23 02:39:15 +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