Mark VanderVoord
d70047881e
Merge pull request #377 from elliot-gawthrop/execution-time-embedded
...
Execution time improvements
2019-05-04 07:53:37 -04:00
Mark VanderVoord
94446cdb5e
Merge pull request #404 from farrrb/fix-nibbles-UnityPrintNumberHex
...
Fixed maximum number of nibbles for processor where sizeof() operator…
2019-05-04 07:39:59 -04:00
Mark VanderVoord
2b0d093837
Merge pull request #403 from farrrb/fix-issue-392
...
Used sizeof operator for pointer increments in UnityAssertEqualIntArray().
2019-05-04 07:39:22 -04:00
Dom Postorivo
9340582797
ARRAY_WITHIN in unity
2019-04-20 14:10:56 -04:00
Dom Postorivo
0bd6bf7b2b
Use Pass string from unity.c in unity_fixture.c to garuntee colour behavior
2019-04-13 14:29:06 -04:00
Fabian Zahn
d01e32299e
Used sizeof() operator for pointer increments and substituted sizeof() operator for the unsigned int mask calculation to "UNITY_INT_WIDTH / 8" in function "UnityAssertEqualIntArray".
2019-04-07 18:34:25 +02:00
Fabian Zahn
52ff8613a2
Fixed maximum number of nibbles for processor where sizeof() operator doesn't return the size of a type in 8-bit bytes (e.g. the TI C2000 series).
2019-04-07 12:09:00 +02:00
Alexander Brevig
0dafa0b306
use unary minus on the incoming int instead of the casted uint
2019-03-12 00:17:37 +01:00
elliot
076f0fff56
Improvements to the execution time feature
...
- Running time macros have been made more portable, previously it was not
possible to override all macros
- Running time macros will be executed by default test runner, and auto test
runners
- Adds a default execution time implementation for unix. (Previous default
implementation only worked on Windows)
- For embedded platforms there is a simple method of getting a default
implementation by defining a single macro UNITY_CLOCK_MS()
- Removed need for UNITY_EXEC_TIME_RESET. This was not being used for the default
implementations, if anything ever did need reset-like functionality it could
simply be wrapped up with the start or stop macros for that platform
2019-01-31 22:01:20 +00:00
Fabian Zahn
b723c9f250
Added braces to avoid implementation solely based on operator precedence.
2019-01-30 21:26:35 +01:00
Mark VanderVoord
38c48704c5
Merge pull request #383 from farrrb/feature-printf
...
Feature printf (Thanks @farrrb !)
2019-01-25 06:09:20 -05:00
Luca Boccassi
5074a3d8b2
Make unity.c compatible with c90
...
Avoid declaring the loop variable inside the for statement to keep
compatibility with c90:
unity.c:1408: error: for' loop initial declaration used outside C99 mode
2019-01-24 21:44:34 +00:00
Fabian Zahn
4f8656f658
Added some documentation for the helper function.
2019-01-24 19:22:01 +01:00
Fabian Zahn
95ccc6edc1
Changed the compiler switch behaviour for printf (default: disabled).
...
Macro UNITY_EXCLUDE_PRINT_FORMATTED changed to UNITY_INCLUDE_PRINT_FORMATTED.
Enable printf via "-DUNITY_INCLUDE_PRINT_FORMATTED" compiler option.
2019-01-24 18:42:51 +01:00
Fabian Zahn
5918ee0cdf
Merge branch 'master' into feature-printf
...
# Conflicts:
# src/unity.c
2019-01-24 18:32:07 +01:00
Mark VanderVoord
f433480f7f
Merge pull request #299 from jlindgren90/float-printing
...
Allow UnityPrintFloat() to print a 7th digit.
2018-11-28 15:27:37 -05:00
John Lindgren
d09f4953ff
Fix another signed integer overflow.
2018-11-28 15:17:25 -05:00
John Lindgren
8a77f48634
Fix undefined behavior when printing INT_MIN/INT64_MIN.
...
Negating the most-negative signed integer results in overflow, which
is undefined behavior. Fix this by casting to an unsigned type first
(unsigned overflow is well-defined as it uses modular arithmetic).
2018-11-28 14:45:23 -05:00
John Lindgren
39fbd13cae
Merge branch 'master' into float-printing
2018-11-28 14:02:41 -05:00
Mark VanderVoord
eab9283a98
Merge pull request #353 from kykrueger/issue-#352-uninitialized-value-warning
...
Issue #352 uninitialized value warning
2018-11-07 09:22:46 -05:00
Mark VanderVoord
695dd04d53
Merge pull request #365 from Kochise/patch-2
...
Patch 2 (Thanks, @Kochise !)
2018-10-31 07:13:30 -04:00
Kochise
50ce8a880a
Some cleanup
2018-10-31 11:41:44 +01:00
Kochise
96127581a0
Some cleanup
2018-10-31 11:30:13 +01:00
Kochise
be765649f1
Some cleanup
2018-10-31 11:24:37 +01:00
Fabian Zahn
f1100dd19a
Added support for %b (bits / binary), %f (float) and %g (double).
2018-10-27 18:21:01 +02:00
Fabian Zahn
b4ab81bbe9
Added first working implementation.
2018-10-27 16:06:38 +02:00
Levin Messing
7cc3cf478b
fixed compile error UNITY_PRINT_EXEC_TIME()
2018-10-18 23:55:38 +02:00
Fabian Zahn
e2e549a22f
Added include of 'stddef.h' to 'unity_internals.h' if 'UNITY_EXCLUDE_STDDEF_H' is not defined. This adds compiler independent support for the 'NULL' macro.
2018-10-14 14:11:22 +02:00
Kyle Krueger
e0d52d1a79
fix uninitialzed value warning
2018-09-12 17:46:11 +02:00
elliot
fb4b139043
Fixed UNITY_EXEC_TIME_STOP macro ifdef
2018-07-28 20:14:00 +01:00
elliot
f0e4571c96
Merge branch 'master' into unit-test-execution-time
2018-07-28 20:01:50 +01:00
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
Xenoamor
2c5d09bf20
Flush unity output before a potential longjmp
...
Flush the unity stdout buffer before calling TEST_ABORT().
This is because if TEST_PROTECT() has not previously been called this will cause a segmentation fault and the stdout buffer will fail to print
Although the segmentation fault will still occur, the error that caused it will at least be displayed
2018-07-18 16:34:14 +01:00
Fabian Zahn
8efa8ffc62
Removed UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION to simplify the behaviour
2018-02-18 13:57:34 +01:00
Jeremy Hannon
9bada282f4
MISRA 19.10: parentheses around macro params
...
MISRA 2004 rule 19.10: inside macros, surround each parameter usage with parentheses.
2018-02-10 14:27:03 -06:00
Jeremy Hannon
91a2353526
MISRA 16.4: param names match func decl & defn
...
parameter names should match between declaration and definition.
(MISRA 2004 rule 16.4)
2018-02-10 13:15:34 -06:00
Mark VanderVoord
62f6cb247a
Merge pull request #312 from shreyasbharath/master_fix_integer_underflow
...
Fix unsigned integer underflow in UnityAssertEqualIntArray (Thanks @shreyasbharath )
2017-11-27 06:50:49 -05:00
Shreyas Balakrishna
4325773e76
Fix unsigned integer underflow in UnityAssertEqualIntArray
2017-11-23 14:59:00 +13:00
John Lindgren
a6d3f3a59a
Restore round-to-even behavior.
2017-11-07 23:25:27 -05:00
John Lindgren
2d4e32cda1
Print 9 digits if we have double precision capability.
2017-11-07 22:44:59 -05:00
John Lindgren
74ba70283a
Improve accuracy of UnityPrintFloat() for common cases.
2017-11-07 11:42:19 -05:00
John Lindgren
8ff74d6000
Allow UnityPrintFloat() to print a 7th digit.
2017-11-07 11:42:19 -05: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
Mark VanderVoord
38c387b76f
Merge pull request #304 from VLambret/master
...
Color test results using ANSI escape codes (Thanks for the work, @VLambret !)
2017-10-24 15:08:50 -04:00
Victor Lambret
17d4ea92e1
Color test results using ANSI escape codes
...
Help error detection by adding specific colors for test results. This
behavior is activated only when unity if compiled with UNITY_COLOR flag.
2017-10-24 07:33:30 +02:00
John Lindgren
df78aade4b
Make weak symbol usage more portable:
...
- Enable support for Green Hills Software compiler
- Define weak implementations only once except on Windows
2017-10-09 11:39:48 -04:00
John Lindgren
a7e8797e0c
Fix link errors with MinGW.
...
MinGW supports a limited form of weak symbols, with the restriction
that weak/default implementations need to be defined in the same
translation unit they are called from. Strong/overriding symbols
may of course be specified in a different translation unit.
2017-10-09 10:49:58 -04:00
jsalling
b119919c4f
Add 64-bit comparison asserts
2017-09-20 18:26:17 -05:00