Jakob Holderbaum
5fbc23e856
Print an EOL before printing the TestResult while executing the spec
...
By printing this newline, the filepath of the failing assertion does not get
preceded by the dot which represents a running test.
This gives the advantage, that the complete output of unity can be used as it is
with a makefile in vim. Every error gets displayed in the quickfix and you can
jump appropiately.
2014-02-16 11:13:38 +01:00
Mark VanderVoord
3399bba27b
- merged in changes by TheGreenDroid to reduce Lint and Compiler warnings
2013-09-22 12:10:42 -04:00
Mark VanderVoord
ff1339ca5a
- Fixed a gcc warning when -Wall enabled. (Thanks gjcamann)
2013-09-22 10:58:36 -04:00
Antony Male
6dd44f23c9
Allow pointer types to have an attribute
...
Microchip's XC16 and friends, when used with dsPICs, require that all pointers
to memory which could possibly be in EDS space by adorned with __eds__, e.g.
__eds__ int* p_int
Adding the macro UNITY_PTR_ATTRIBUTE allows Unity's pointers to be decorated
with whatever ridiculous attributes the compiler requires.
2013-09-17 10:10:43 +01:00
Antony Male
07736afe63
Fix TEST_ASSERT_EQUAL_INT_ARRAY for int sizes other than 32 bits
...
This patch fixes testEqualIntArrays in the unity test suite on 16-bit
architectures.
TEST_ASSERT_EQUAL_INT_ARRAY calls UnityAssertEqualIntArray with 'style'
set to UNITY_DISPLAY_STYLE_INT.
UNITY_DISPLAY_STYLE_INT is defined as UNITY_DISPLAY_STYLE_AUTO +
UNITY_DISPLAY_STYLE_INT{16,32,64} (depending on the int width).
However, the switch statement in UnityAssertEqualIntArray has special
cases for the width-specific display styles, but these comparisons
are carried out without clearing the UNITY_DISPLAY_STYLE_AUTO flag.
This means that if 'style' is UNITY_DISPLAY_STYLE_INT, and the int
width is, say, 16, bits, the default case will be hit, and elements
compared as if they were 32 bits wide. Unsurprisingly this causes
a failure in the test named above.
2013-06-28 09:34:49 +01:00
Mark VanderVoord
af76099975
Merge pull request #32 from alejmrm/missing_defs4uf_ud
...
Fix missing #define when UNITY_EXCLUDE_FLOAT is used
2013-02-06 17:01:53 -08:00
James Hood
b8d47ff2a3
report correct (zero-based) index in string array equality mismatch
2013-02-06 09:58:21 -06:00
Alex Rodriguez
ef37c6bc60
fix missing #define when UNIT_EXCLUDE_FLOAT is used
2013-02-04 17:03:31 -07:00
Bryan A. Jones
bc251726b6
Add: Additional documentation for Unity configuration options.
2012-12-03 11:36:45 -06:00
Bryan A. Jones
5b1e9818e2
Fix: Clean up UINTY_xxx_WIDTH detection.
...
Document failing approach (sizeof).
2012-11-29 15:34:09 -06: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
Bryan A. Jones
c2737fc71c
Fix: For floats, make sure all constants are single-precision floating point values.
...
For doubles, make sure all constants are double-precision.
2012-11-20 14:45:04 -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
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
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
5027763534
Fixed typo in comment.
2012-10-30 09:29:54 +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
3d1f3a5a00
Fully expand Unity struct.
2012-10-01 17:31:40 -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
John Van Enk
b7d9d007ce
Merge branch 'master' of github.com:ThrowTheSwitch/Unity
...
Conflicts:
src/unity_internals.h
2012-06-20 20:03:36 -04:00
mvandervoord
91ea65ca12
- I've decided to automatically turn on 64-bit support if the pointers, ints, or longs require it.
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@142 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2012-05-28 01:07:35 +00:00
mvandervoord
c4f0537c0c
- changed the default handling to always include stdint unless told to exclude it.
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@140 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2012-05-27 21:54:53 +00:00
mvandervoord
dbdc603024
- further fixes to pointer auto-detect
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@139 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2012-05-27 21:48:49 +00:00
mvandervoord
c1b954eb9d
- added size auto-detection support from limits.h
...
- fixed error in _INT macro size guessing
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@138 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2012-05-27 20:29:33 +00:00
Scott Vokes
4742b5d77a
Change gcc.yml default to gcc_32.yml (explicitly compile for 32-bit target)
2012-04-27 11:53:12 -04:00
Scott Vokes
d0c3f24f4d
If using UNITY_SUPPORT_64, UNITY_POINTER_WIDTH should default to 64 (not 32).
...
Fixes failing test cases on 64-bit OSX: pointers to local variables were
being converted to U32s before comparison.
2012-04-27 10:31:54 -04:00
mvandervoord
d0d5ec5d75
- unity_test_summary script callable from command line again
...
- fixed obj_file sorting in rakefiles
- gave better anchors for gcc to grab on test pass/fail by breaking them out as functions
- fixed minor type issues
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@137 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2012-01-02 21:38:36 +00:00
mvandervoord
3a82e1eeab
- fixed summarizer to handle more generic input
...
- ignore comments in test parser
- fixed a couple bugs in 16-bit support
- fixed minor compiler errors for less lenient compilers
- fixed error in docs.
- renamed link to link_it in rakefiles to avoid collision in new versions of rake
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@136 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-10-11 02:40:04 +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
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
4e4046a897
- updated memory assert to be more verbose (and dropped memcmp)
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@127 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-04-01 02:09:30 +00:00
mkarlesky
bc1674df09
added some barely needed comments to UnitySizeMask
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@126 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-03-22 23:45:43 +00:00
mvandervoord
0195ea4e5a
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@125 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-03-22 18:03:36 +00:00
mvandervoord
3ef64ee047
- replacing non-universal method of masking word sizes
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@123 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-03-04 19:01:27 +00:00
mvandervoord
e06aa48bca
- fixed minor bug which was causing warnings on some compilers
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@121 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-03-03 12:15:11 +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
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
4b8d521247
- version file is just going to have major and minor... leave build for the other file (which will hopefully be automatic someday).
...
- only extern the output function when it's custom.
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@113 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2011-01-14 00:54:12 +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
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
mvandervoord
d1bd6e29cc
- dropped lf in output
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@100 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-10-22 14:57:52 +00:00
mvandervoord
ab221162d3
- inlined '0x' printing in UnityPrintNumberHex to avoid unnecessary recursion
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@93 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-09-07 13:20:26 +00:00