1251 Commits

Author SHA1 Message Date
ccd7ca72f3 Merge pull request #542 from farrrb/patch-1
Update UnityConfigurationGuide.md
2021-02-26 07:38:47 -05:00
66cec22838 Update UnityConfigurationGuide.md
Add semi-colon to configuration :)
2021-02-26 07:51:57 +01:00
74cde089e6 Merge pull request #540 from numaru/master
Enlarge the TEST_RANGE() regex to accept more spaces (Thanks for the help, @numaru !)
2021-02-12 15:42:25 -05:00
63fef7dd10 Enlarge the TEST_RANGE() regex to accept more spaces
This commit change the regex to accept more spaces inside the brackets
of the TEST_RANGE().

I use clang-format through vscode "editor.formatOnSave": true feature and it produce
padding spaces inside the array brackets by default.

```c
int a[] = [1, 2];
```

is changed into

```c
int a[] = [ 1, 2 ];
```

Also, every time I save a file containing a TEST_RANGE() with ctrl + s,
it breaks it.
2021-02-12 20:39:05 +01:00
78dea55ba5 Merge pull request #539 from Borowiec-B/master
Fix typo in doc (Thanks Michael!)
2021-02-10 09:28:45 -05:00
563b93e5ec Fix typo in doc 2021-02-10 15:20:03 +01:00
0b899aec14 Fix conditional issue in generator script.
Bump version.
v2.5.2
2021-01-26 08:59:27 -05:00
d8eb8414f4 Stop noticing my sublime files. ;) 2021-01-16 21:20:09 -05:00
05994f5061 Merge pull request #536 from ThrowTheSwitch/test/switch_to_actions
Attempt to get Actions Working
2021-01-16 21:05:49 -05:00
fcab680286 Ruby script cleanup.
Fix warnings.
Remove 32-bit tests from standard suite because they're not running on most platforms.
2021-01-16 21:03:18 -05:00
3c1c5338af Need to checkout.
Drop Slack support
2021-01-16 20:27:49 -05:00
9e7c259822 Do we need to be admin to install gems? 2021-01-16 20:19:29 -05:00
ce132da37f Merge pull request #535 from ThrowTheSwitch/test/switch_to_actions
Switch from Travis to Github Actions.
2021-01-16 20:15:22 -05:00
ffb51ecb7e Switch from Travis to Github Actions.
Update year in docs.
2021-01-16 20:05:20 -05:00
0b078cdb6e Merge pull request #533 from carsonalh/master
Fixed CMake install when compiled with extensions
2021-01-08 09:01:41 -05:00
53e1449f89 Fixed CMake install when compiled with extensions
This is a fix from the change I made in
`commit 418c1635f2f1bcd353b6fce23a16594c914047b8`
where I added options to compile unity with the `fixture` and `memory`
extensions:

In that version, Unity had been able to build, but there were some issues when
trying to install it. Namely, the CMake generator expressions were not
evaluated correctly, and it would try to install with a path that had
un-expanded generator commands in it, which would obviously fail and throw an
error. I've got a feeling that this is a bug with CMake, but for now the
workaround that worked in [this stackoverflow
post](https://stackoverflow.com/questions/51541678/nested-cmake-generator-expressions-are-only-partially-evaluated)
seemed to work here, as well.

Another issue with that commit was that it tried to include a
`unity_memory_internals.h` file, which did not exist. This has also been
resolved.
2021-01-08 10:34:38 +10:00
830f77f9ee Merge pull request #509 from alecoding/issue_507
Fix warning for issue #507
2021-01-07 18:08:51 -05:00
038dd81213 Merge pull request #520 from softwareinmotion/runner_mock_suffix
parse mock files correctly
2021-01-07 18:08:09 -05:00
99fb90a939 Merge pull request #522 from JuPrgn/master
Add guard TEST on test module template
2021-01-07 18:05:48 -05:00
b7469138a5 Merge pull request #530 from carsonalh/master
Added options to compile "fixture" and "memory" extensions in CMakeLists
2021-01-07 18:05:05 -05:00
418c1635f2 Added option to compile fixture and memory extensions in CMakeLists.txt 2020-12-20 12:58:11 +11:00
386c540510 Merge pull request #524 from sardior/exlude-details-compile-fix
Update unity.c
2020-10-12 08:36:48 -04:00
723b9fee53 Update unity.c
UNITY_EXCLUDE_DETAILS caused a compile error here due to UNITY_DETAIL{1,2}_NAME declaration already being skipped.
2020-10-08 00:55:47 +02:00
76c3755fe3 Add guard TEST on test module template
With a test file guarded we can include this file on IDE project
(MPLAB X in my case) and compile without excluding test files.
Excluding test files on MPLAB X disable autocompletion and function
navigation.
2020-09-07 10:37:26 +02:00
c3afe99a77 parse mock files correctly 2020-08-27 13:21:45 +02:00
98045925af Merge pull request #514 from michaelbrockus/let_meson_handle_flags
Let meson handle flags
2020-08-06 06:37:48 -04:00
62d0e7d68e Update meson.build 2020-08-05 21:15:37 -07:00
52d5f59b72 Update meson.build 2020-08-05 21:13:06 -07:00
09acb0b64f Merge pull request #513 from carsonalh/msvcfix
Fix for MSVC compilation errors
2020-07-18 10:37:51 -04:00
e640949eb3 Patched compilation error for MSVC. 2020-07-18 21:59:55 +10:00
6fecc8eb38 Added MSVC options to CMakeLists.txt. 2020-07-18 21:58:54 +10:00
777ad17420 Added MSVC options to CMakeLists.txt. 2020-07-18 21:52:00 +10:00
8bbfe1f5ac Fix warning from issue #507
UnityFail() and UnityIgnore had the noreturn attribute with long jumps disabled
2020-06-06 08:07:57 -07:00
0126e4804c Merge pull request #504 from phyrwork/master
Fix TEST_ASSERT_BIT(S)_HIGH testing only lower 32-bits (Thanks @phyrwork !)
2020-05-26 08:04:03 -04:00
b4b1994bd7 Fix TEST_ASSERT_BIT(S)_HIGH testing only lower 32-bits
The high/low bits masks for TEST_ASSERT_BIT(S)_HIGH/LOW are created
by casting 0/-1 to UNITY_UINT32. This isn't OK on 64-bit platforms
as it results in a high bits mask of 0x00000000ffffffff instead of
0xffffffffffffffff.

Cast 0/-1 to UNITY_UINT instead.
2020-05-26 12:58:14 +01:00
fedd1495c2 Merge pull request #503 from andred/master
unity: annotate noreturn APIs (fix Wsuggest-attribute=noreturn warnings)
2020-05-25 11:09:55 -04:00
a6a4e9766d unity: annotate noreturn APIs (fix Wsuggest-attribute=noreturn warnings)
GCC (& Clang) have the notion of pure and const functions [1],
where those attributes are intended to help the optimiser.

Annotate a few APIs here with the appropriate key words, which
also fixes Wsuggest-attribute=noreturn warning, which a
source base might have enabled:
Compiling unity.c...
.../src/unity.c: In function ‘UnityFail’:
.../src/unity.c:1759:6: warning: function might be candidate for attribute ‘noreturn’ [-Wsuggest-attribute=noreturn]
 1759 | void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
      |      ^~~~~~~~~
.../src/unity.c: In function ‘UnityIgnore’:
.../src/unity.c:1796:6: warning: function might be candidate for attribute ‘noreturn’ [-Wsuggest-attribute=noreturn]
 1796 | void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line)
      |      ^~~~~~~~~~~

[1] https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html

Signed-off-by: André Draszik <git@andred.net>
2020-05-25 15:49:47 +01:00
06a668579f Merge pull request #501 from andred/master
allow compilation with stricter warnings (Thanks @andred !)
2020-05-25 06:59:32 -04:00
9760c4f14f unity: fix Wswitch-enum warning
Compiling a source base / test with Wswitch-enum enabled, gives
the following warning:

../src/unity.c: In function ‘UnityAssertFloatSpecial’:
../src/unity.c:1092:5: warning: enumeration value ‘UNITY_FLOAT_INVALID_TRAIT’ not handled in switch [-Wswitch-enum]
 1092 |     switch (style)
      |     ^~~~~~

Fix by adding the missing value to the default (unhandled) case.

Signed-off-by: André Draszik <git@andred.net>
2020-05-25 08:58:37 +01:00
f5ff3504b5 auto/run_test: fix Wsign-compare warning
Compiling a source base / test with Wsign-compare enabled, gives
the following warning:

build/test/runners/test_system_runner.c: In function ‘run_test’:
build/test/runners/test_system_runner.c:62:35: warning: conversion to ‘UNITY_UINT’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
   62 |     Unity.CurrentTestLineNumber = line_num;
      |                                   ^~~~~~~~

Fix by updating the type in the function declaration.

Signed-off-by: André Draszik <git@andred.net>
2020-05-25 07:14:14 +01:00
b0032caca4 Merge pull request #499 from jsloth/bugfix/suiteTearDown
Fixed suiteTearDown not matching prototype
2020-05-04 16:09:30 -04:00
dcb30731f8 Fixed suiteTearDown not matching prototype
Fixed suiteTearDown to match prototype in unity.h
2020-05-04 20:34:45 +02:00
77c394e975 Merge pull request #498 from AlariOis/master
c99 support for new RUN_TEST macro. Thanks @AlariOis !
2020-05-04 09:48:23 -04:00
87f382fbb2 Merge branch 'master' into master 2020-05-04 09:45:03 -04:00
97f6d55256 c99 support for new RUN_TEST macro 2020-05-04 08:20:19 +03:00
cf949f45ca Bump Version v2.5.1 2020-05-03 16:03:07 -04:00
fd80d514ee Revert "More elegant RUN_TEST macro"
This reverts commit cdfb7e092ccb3cb1080486dd0d78bc713b7317da.
2020-05-03 08:57:21 -04:00
9f4b2251de Merge pull request #493 from VShilenkov/master
cmake: update CMake
2020-05-02 14:38:02 -04:00
c5413ce16b Merge pull request #497 from AlariOis/master
More elegant RUN_TEST macro
2020-05-02 14:36:03 -04:00
cdfb7e092c More elegant RUN_TEST macro 2020-05-01 08:18:09 +03:00