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
3399bba27b
- merged in changes by TheGreenDroid to reduce Lint and Compiler warnings
2013-09-22 12:10:42 -04:00
ff1339ca5a
- Fixed a gcc warning when -Wall enabled. (Thanks gjcamann)
2013-09-22 10:58:36 -04:00
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
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
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
b8d47ff2a3
report correct (zero-based) index in string array equality mismatch
2013-02-06 09:58:21 -06:00
ef37c6bc60
fix missing #define when UNIT_EXCLUDE_FLOAT is used
2013-02-04 17:03:31 -07:00
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
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
2ab2fef60a
Array comparisons of floating point types fail if any values are NaN or infinite.
2012-10-31 12:34:30 +00:00
b9b18bf547
Added new asserts to check for plus/minus infinity and NaN.
2012-10-30 17:08:43 +00:00
b14819bc79
Expanded NaN and Infinity handling to doubles.
2012-10-30 16:12:50 +00:00
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
5027763534
Fixed typo in comment.
2012-10-30 09:29:54 +00:00
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
3d1f3a5a00
Fully expand Unity struct.
2012-10-01 17:31:40 -04:00
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
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
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
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
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
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
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
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
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
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
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
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
d01fe47662
- renamed 'bit' variable to 'current_bit' to avoid name collision with some special compilers (HiTech for PIC)
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@92 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-09-06 19:03:07 +00:00
f5ce02f135
- removed pointless cast from UnityPrint
...
- test executable returns number of failures as exit status
- caught up lame text docs
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@90 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-08-13 00:32:34 +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
4049959edc
removed unnecessary function overhead introduced in previous commit
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@83 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-07-08 17:42:15 +00:00
1f14c09b2b
added protection to prevent multiple test assertion failures or multiple ignores in single test case (usually due to asserts in tearDown)
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@82 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-07-08 17:24:11 +00:00
a867d1f6bf
- fixed some formatting
...
- added a cast to reduce warnings
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@80 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-06-24 19:16:48 +00:00
b8007051b1
- All array asserts now check for NULLs properly and uniformly
...
- Cleaned up testing
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@79 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-06-24 16:42:57 +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
2b881e22d8
(1.) removed errant '.' from memory mismatch string (2.) made string asserts more verbose for NULL string pointers (3.) modified UnityPrint to display unprintable characters as codes
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@77 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-06-24 02:23:56 +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
3fbc034e7d
- restored examples to working condition
...
- restored makefiles to working condition
- updated files to include copyright notice
- fixed bug in string array comparisons
- ignored tests no longer run teardown
- tests failing for uncaught cexceptions now get exception id reported
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@70 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-04-26 01:10:48 +00:00
12d4d14388
- fixed floating point comparison
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@69 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-04-18 23:25:32 +00:00
54a924571b
- updated color handling by standardizing output
...
- cleaned up internal types
- added verbose float support when sprintf is available and desirable
- tested float array handling (and fixed a bug! woo!)
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@68 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-04-02 18:11:07 +00:00
4fc9cf594a
- added array handling for smaller integer types
...
- added array handling for floats
- cleaned up filename handling in scripts
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@67 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-03-30 03:34:09 +00:00
e189a1b332
- cleaned up Unity header file
...
- added macros to support more combinations
- shrunk code size by reducing functions and macro sizes
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@62 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-03-20 20:58:46 +00:00
2051e500cb
- fixed order of test assert bits
...
- test_runner_generator now protects against directories in include statements
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@61 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-03-14 01:50:53 +00:00
5e75c90c89
- standardized output format for test results
...
- added color coding to output
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@58 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2010-03-10 03:10:41 +00:00
4eb66d2f2f
fixed typo in use of float exclusion macro
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@49 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2009-12-10 20:57:24 +00:00
b6817999c1
- make floating point support optional and configurable
...
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@48 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
2009-12-06 18:56:35 +00:00