112 Commits

Author SHA1 Message Date
aef36799d8 Fixed UNITY_TEST_ASSERT_EACH_EQUAL_*
Fixed copy-paste error for:
- UNITY_TEST_ASSERT_EACH_EQUAL_INT64
- UNITY_TEST_ASSERT_EACH_EQUAL_UINT64
- UNITY_TEST_ASSERT_EACH_EQUAL_HEX64

So that the comparison is done on the expected _value_ instead of the _array_.
2017-05-10 14:28:08 +02:00
550d58ba2d Attempt to fix remaining issues with casting 2017-03-26 19:46:42 -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
b7956ea988 Added more tests for all the numerical types when performing each_equal assertions 2017-03-21 16:24:16 -04:00
7fe31915d0 Added some tests to prove this works. Still work in progress 2017-03-21 14:37:52 -04:00
56eeacd0b2 prepare for comparing value to array by setting up explicit compare of array to array in ints 2017-03-21 08:00:48 -04:00
8723d50f0e Turn UNITY_OUTPUT_FLUSH off by default. Added a quick-define for the most common case: UNITY_USE_FLUSH_STDOUT. Clarified documentation. Fixes issue #269 2017-03-14 23:23:19 -04:00
3588e5b6d3 Aligning definition and declaration of UnityPrintFloat
There was a mismatch of definition and declaration of UnityPrintFloat
and this commit aligns both on const UNITY_DOUBLE, but then inside it
actually uses a positive version of the variable only.
2017-01-24 22:52:43 +01:00
b29ad2ee68 Removing unnecessary function prototypes, inline PrintOk/Fail 2017-01-18 09:14:02 -06:00
f1fdc47e40 Merge pull request #250 from jsalling/feature/optional-setjmp
Optional UNITY_EXCLUDE_SETJMP_H, different control flow
2017-01-18 09:00:23 -05:00
836d7886cf Pointer-to-int-cast warnings with different widths
With a wider integer width than a pointer, gcc can still warn
when you cast a pointer. Strange but true. To see these warnings
compile with gcc -m32, 32-bit target, and enable UNITY_SUPPORT_64
2017-01-14 11:39:21 -06:00
ef1e2ad58c Option to exclude setjump/longjmp, setjmp.h
Using this option changes the control flow of Unity, but is useful on
constrained embedded systems. You can't fully simulate the power of
'longjmp' with just 'return', but Unity still works well, all tests pass.
2017-01-14 11:15:30 -06: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
6695e9e975 Merge pull request #242 from jsalling/feature/fixture-test-name
Fixture - Remove duplicate output of test name in verbose mode
2017-01-13 16:38:10 -05:00
9954d4f863 Merge pull request #244 from jsalling/cleanup/promotion-warnings
Remove promotion warnings on float constants, Inline the isneg/ispos macros
2017-01-13 15:46:07 -05:00
9e8ab3df84 Merge pull request #241 from jsalling/cleanup/float-testing
Cleanup floating point print testing, update docs
2017-01-13 15:42:15 -05:00
4c78cde202 Finish clean up of float support options 2016-12-30 20:24:45 -06:00
f771f0b98f Finish cleaning up float options in testunity 2016-12-29 23:06:34 -06:00
bd4ac58486 Inline the isneg/ispos macros, remove promotion warnings on constants
Originated from commit c6dc96f3 but are rarely used and not in math.h
Removes float to double promotion warning and simplifies the code
'gcc -std=gnu99 -Wdouble-promotion' spits out these warnings
2016-12-29 20:47:03 -06:00
5f33721924 Remove duplicate output of test name, Fixture verbose mode
Remove UNITY_FIXTURES option, which was probably not doing what was
originally indended. It was suppressing the test name even in quiet mode.
2016-12-28 21:18:50 -06:00
e1e866ab45 Delete old UNITY_PTR type, no longer used
The old type was really just used as a cast-to-int to do pointer math
in char size.
2016-12-23 22:39:08 -06:00
5f386a42ff Refactor of IntArray function with switch inside loop, remove repeated code 2016-12-23 22:19:42 -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
7dc17efbb3 Merge pull request #215 from jsalling/bugfix/inf-equals-inf
Bugfix Inf equals Inf
2016-09-21 20:52:58 -04:00
6d54ec2ff7 Get rid of conversion warning when using UNITY_FLOAT_VERBOSE with doubles
Change the parameter of UnityPrintFloat from float to double (_UD)
 The call to snprintf uses implict default promotion to a double anyway
2016-08-27 15:34:10 -05:00
54aa838c8a Change the fallback isinf() macro to NOT need f_zero defined
Delete old comments from before math.h was the default isinf() method
2016-08-27 15:27:52 -05:00
28c94bd403 Remove references to UNITY_EXCLUDE_SIZEOF, rework config header 2016-08-25 08:48:29 -05:00
e4e2210eb6 Improving integer width detection
The C preprocessor cannot use sizeof in #if etc.
2016-08-25 08:32:42 -05:00
f276c79f9b Merge branch 'feature/cmd_line_args' 2016-08-11 13:37:51 -04:00
f1a4a5e652 Weak attribute fix for TMS470 Compilers.
Change-Id: I901bf192d3c06457d67c6d3a64bdb9aea22c53c2
2016-07-13 10:36:43 +02:00
eba387fa3e - Add tests which prove command line arguments now work with runner. Fixed a few bugs in this area. 2016-06-27 08:41:58 -04:00
4d3d062b56 Adding command line support. Started with -n (test name matching) -x (test name exclusion).
Script verification hasn't been added yet.
2016-06-21 16:07:10 -04:00
b3bc196ab3 making new flush routines work under all defined conditions. 2016-06-21 10:01:34 -04:00
61dd3f181b Change comments style in unity and test runner to compile with std=c89 2016-05-15 14:35:50 +01:00
c5c392b18a update UNITY_OUTPUT_CHAR to not return a value (because we never check it anyway).
add UNITY_OUTPUT_FLUSH to make sure we get the output we need on aborted tests and whatnot.
2016-05-06 10:47:39 -04:00
593a03462e Add an option to omit UNITY_OUTPUT_CHAR declaration from the header
This solves the warnings from -Wredundant-decls when overriding the
  OUTPUT function with a function declared in another header.
 It's better this is the non-default option, since using it requires either
  a declaration of the new function OR a preprocessor guard on declaring
  UNITY_OUTPUT_CHAR (as in unity.c here), in every file using the function.
 See Pull Request #185 for more.
2016-04-24 23:30:19 -05:00
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
a27b03c79a UNITY_OUTPUT_CHAR can emit a redundant declaration, we scope the extern declartion to the unity.c 2016-04-13 12:19:04 +02:00
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
3bb51bd740 Fix C89 warnings about variables at top of scope, enums, variadic macros
Add extern UnityFixture in internals header. Add C89 target in Makefile
 clang will show these warnings but can suppress "//" with -Wno-comment.
2016-02-26 20:51:04 -06: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
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
e8662ae1cc - Get these pointers all straightened out! Allow us to override them 2015-12-10 21:47:03 -05:00
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
dfbf21c2a3 - Added ability to tack on details to a Unity failure message. 2015-12-10 13:06:41 -05:00
9aeaee26c9 - Cleaned up UnitPointer_Set (thanks Eric)
- Cleaned up a casting warning error
- Removed a couple semicolons from the end of macros SHAME!
2015-12-07 21:41:44 -05:00