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

373 Commits

Author SHA1 Message Date
John Lindgren
32e6d93ab0 Fix TEST_ASSERT_HEX64_ARRAY_WITHIN truncating delta to 32 bits. 2019-10-29 16:59:59 -04:00
John Lindgren
9c82fac380 Update incorrect comment. 2019-10-29 13:21:59 -04:00
mvandervoord
74d47e8afa Add missed casting 2019-10-29 06:34:09 -04:00
mvandervoord
354e2b4da6 Added set of assertions for checking CHAR's and CHAR arrays (not as strings) 2019-10-28 16:54:32 -04:00
mvandervoord
60b23dc8a4 Stopped supported -0 as a float output because (a) it is non-portable, only existing on some architectures and (b) relies on the undefined behavior of 1.0/0.0 2019-10-28 13:43:32 -04:00
mvandervoord
e1dca8fa48 Add options for different output formats 2019-10-28 12:43:11 -04:00
Mark VanderVoord
3f334b8be6 Merge pull request #450 from arcadien/fix_comments
Fix CMakeLists
2019-10-28 10:45:23 -04:00
mvandervoord
be87d790c7 Add verifyTest option to go with resetTest.
Fix docs.
2019-10-28 10:32:22 -04:00
Aurelien Labrosse
b75b19c969 CMakeLists fixes 2019-10-26 18:31:57 +02:00
mvandervoord
368a7d8970 Fixed a couple of mistakes in last commit 2019-10-25 11:20:25 -04:00
mvandervoord
d16c27b085 - added target for checking ANSI compliance
- fixed ANSI (C89) issues, including #418
2019-10-25 10:17:12 -04:00
Mark VanderVoord
d9b0edf282 Switch from the inconsistent use of weak symbols to handling setup, etc in script generators 2019-10-21 14:21:52 -04:00
Mark VanderVoord
9842a4d03d Switching to universal version being in the header file itself. 2019-10-21 10:12:59 -04:00
Mark VanderVoord
77008edca9 Support size_t macros 2019-10-21 08:32:35 -04:00
Mark VanderVoord
50db1a7e67 Merge pull request #445 from michaelbadcrumble/fix_meson_support
Fix Meson build system support.
2019-09-30 05:58:47 -04:00
Michael Brockus
7e3804545c Fixed typo in sub CMakeLists.txt.
Fixed a simple mistake.
2019-09-22 06:59:35 -07:00
Michael Brockus
bc7d89a891 Create CMakeLists.txt
Added new CMakeLists.txt here in the src dir, moved add library method from root script to sub script.
2019-09-17 12:17:22 -07:00
Michael Brockus
822e244bd4 Update source meson.build
Removed 'unity_src' variable because Unity only one source file, changed library method to static only because there was some issues with using Unity as a shared library, cleaned sub meson.build script and fixed comment in sub source root.
2019-09-17 09:37:41 -07:00
Mark VanderVoord
46263fc148 Get the 2's compliment of the unsigned int number when printing results without relying on problematic recasting of a negated int. (see #439) 2019-09-10 15:52:37 -04:00
Aurelien Labrosse
3ac73efe62 optimisation(AVR): Store static string in AVR EEPROM
* This can save a lot of program memory and allow to run test on ATTiny
2019-07-09 09:58:48 +02:00
Mark VanderVoord
3e82c0a96f sigh. wrong comment style 2019-07-06 11:07:00 -04:00
Mark VanderVoord
0000f1e6d2 Add TEST_MESSAGE for outputting messages without aborting a test and _MESSAGE variant to TEST_PASS collection. 2019-07-06 11:02:32 -04:00
Mark VanderVoord
45020b0d3b Cleanup issue #417 2019-07-05 19:14:22 -04:00
Mark VanderVoord
bc72eeb211 Merge pull request #425 from farrrb/fix-ti-c55-sizeof
TI C55x compatibility patches - removal of sizeof operator from the interfaces
2019-07-05 15:41:41 -04:00
Mark VanderVoord
4661e67233 Merge pull request #429 from squidfarts/master
Meson support for Unity unit testing framework.
2019-07-05 15:34:23 -04:00
Mark VanderVoord
c30730faf6 cleanup warning. 2019-07-03 15:07:44 -04:00
Mark VanderVoord
f2d826c7c5 - Added options for how to handle TEST_ASSERT_EQUAL shorthand
- Tweak a couple style problems with Ruby scripts.
2019-07-03 15:03:03 -04:00
Michael Brockus
bd4d35ddd0 Added meson.build in src directory. 2019-07-02 19:58:16 -07:00
Fabian Zahn
2b250055bc Add indentation for type autodetection macros 2019-05-12 19:57:54 +02:00
Fabian Zahn
885ae9638e Introduce patch from "UnityAssertEqualIntArray" for "UnityAssertNumbersArrayWithin" in order to get rid of the sizeof() operator 2019-05-12 09:31:26 +02:00
Fabian Zahn
ae3aad7b89 Remove the remaining sizeof() operators from internal interface
sizeof() is a hell of an operator and returns the size of a data type in terms of "addressable units" which is not necessarily the size in bytes. To circumvent this problem and in order to keep the API clean we try to remove all sizeof() from the API.
2019-05-12 09:24:49 +02:00
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