1251 Commits

Author SHA1 Message Date
563786f97c Add support for TEST_RANGE with exclusive end
If the range is <start, end, step> instead of [start, end, step], the
end value will not be included in the range.

This can be useful if you have a define that defines e.g. the size of
something and you want to use this define as the end value. As the
pre-processor doesn't evalutate expressions (unless you do some macro
magic) you can't specify the range as [0, MY_SIZE - 1, 1]. With this
change you can then instead give the range <0, MY_SIZE, 1>.
2022-10-14 18:51:45 +02:00
22777c4810 Merge pull request #635 from Westlanderz/bugfix/Cross-compiling-set-native
Fix compiling native when main project is cross-compiling
2022-10-14 10:35:13 -04:00
5c23fa3c16 Merge pull request #634 from erijo/test-case-space
Improve handling of space in TEST_CASE/RANGE (Thanks @erijo !)
2022-10-14 10:09:41 -04:00
76b7e359cc Improve handling of space in TEST_CASE/RANGE
The fix in 285bb6e282 didn't completly fix the issue.
2022-10-13 22:13:03 +02:00
fc5b33ce71 Fix compiling native when main project is cross-compiling 2022-10-13 15:36:10 +02:00
37b61d2be2 Merge pull request #555 from erijo/test-case-space
Ignore space around parameter in TEST_CASE()
2022-10-11 16:25:05 -04:00
de73f1fcbf Merge pull request #554 from erijo/single-test-range
Make TEST_RANGE handle a single range
2022-10-04 21:57:38 -04:00
30046e664e remove unityConfig.cmake from .gitignore 2022-09-02 16:03:55 -03:00
f62ff65f9b fix: add cmake outputs in .gitignore 2022-09-02 15:28:40 -03:00
612aec09e8 Support long and long long types in TEST_PRINTF
This change helps Unity parse and print correctly in cases where a long
or long long type is passed to TEST_PRINTF.

Example situations:

```C
// With %u:
TEST_PRINTF("%u %d\n", ((1ULL << 63) - 1), 5); //  --> prints 11982546 -1 (both arguments incorrect because only 4 of the 8 bytes were read out of the va_list)

// With %llu, UNITY_SUPPORT_64=0
TEST_PRINTF("%llu %d\n", ((1ULL << 63) - 1), 5); //  --> prints 4294967295 5 (first argument wrapped, second argument intact)

// With %llu, UNITY_SUPPORT_64=1
TEST_PRINTF("%llu %d\n", ((1ULL << 63) - 1), 5); //  --> prints 9223372036854775807 5 (both arguments correct)
```
2022-07-27 02:39:14 +02:00
062e44ebc5 Provide custom build configuration for the PlatformIO 2022-06-27 17:20:22 +00:00
3852926c00 Merge pull request #624 from trbenton/bugfix/stray-tab
Formatting: Replace a stray tab with spaces
2022-06-22 08:11:50 -04:00
ca7a1707c9 Formatting: Replace a stray tab with spaces 2022-06-21 23:38:03 -04:00
4ee26e4e0d Merge pull request #619 from eli-schwartz/meson-cleanup
Meson cleanup
2022-06-19 15:31:37 -04:00
1b13155244 meson: include the license info in the project definition
This is useful to help convey the usage rights and e.g. generate a
Software Bill of Materials.
2022-06-19 13:49:52 -04:00
0129cf5b11 meson: specify correct minimum versions of Meson
The main project doesn't really have any specific version requirement.
Specify a very low one just in case -- 0.37.0 is old enough to cover
probably any existing use of Meson anywhere in the wild, and
coincidentally is also the version that Meson started adding feature
warnings for, to notify you if you use too-new features.

The example *does* depend on a specific version. It needs 0.55.0 in
order to use subproject wrap dependency fallback instead of the legacy
style of specifying the name of the variable as a fallback. Ensure that
is used.
2022-06-19 13:44:57 -04:00
ae10bd1268 examples: meson: do not use deprecated test naming style
Tests cannot contain a ":", and configuring the example produced the
following warning:

test/test_runners/meson.build:12: DEPRECATION: ":" is not allowed in test name "Running: 01-test-case", it has been replaced with "_"
test/test_runners/meson.build:13: DEPRECATION: ":" is not allowed in test name "Running: 02-test-case", it has been replaced with "_"

In this case, the "running" part is redundant, so remove it.
2022-06-19 13:41:09 -04:00
57e08575c2 Merge pull request #618 from troglobyte-coder/master
Updating the Meson build scripts
2022-06-19 12:27:18 -04:00
193f130aed Update unity.wrap 2022-06-19 06:36:25 -07:00
b7b65737e8 Update meson.build 2022-06-19 06:35:43 -07:00
91d16179b5 Update meson.build 2022-06-19 06:34:23 -07:00
df2ea08157 Update meson.build 2022-06-19 06:33:19 -07:00
1958b97701 Merge pull request #615 from jhancharler/dev/fixtureReadmeFileTypo
fix wrong filename mentioned in readme for fixtures
2022-06-05 12:55:37 -04:00
02e0bd5382 fix wrong filename mentioned in readme for fixtures 2022-06-05 14:01:48 +01:00
782ff32e9d Merge pull request #614 from mjago/master
Fix call to ERB.new to avoid deprecation warnings.
2022-05-28 09:17:36 -04:00
5dd3aa40dc Fix call to ERB.new to avoid deprecation warnings.
On later Rubies calling create_run_test() causes the generation of warnings of the following form:

warning: Passing safe_level with the 2nd argument of ERB.new is deprecated...
warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated...

This patch removes the noise.
2022-05-28 12:35:22 +01:00
b29a4bc360 Merge pull request #613 from mjago/master
Fix broken YAML parsing on later Rubies with Psych >=4.0 (Thanks @mjago !)
2022-05-27 10:30:01 -04:00
b44c2dd095 Fix broken YAML parsing on later Rubies with Psych >=4.0
YAML.load is now interpreted as YAML.safe_load, which breaks where the
YAML file contains aliases. If we can assume our yaml files are
trusted (since this a development tool), we can check for the presence
of YAML.unsafe_load and use it instead if it exists.
2022-05-27 15:08:11 +01:00
e54c9787b7 Merge pull request #560 from jonathangjertsen/more-float
Add macros for testing inequalities between floats, doubles
2022-05-25 11:04:56 -04:00
465b659c81 Merge pull request #609 from ivankravets/patch-3
Improve keywrods list
2022-04-22 11:24:24 -04:00
a260ba1e4e Improve keywrods list 2022-04-22 17:48:58 +03:00
22f78433c3 Merge pull request #608 from ivankravets/patch-2
List Unity framework in PlatformIO Registry
2022-04-22 07:20:33 -04:00
bc8a650d30 Merge pull request #607 from ivankravets/patch-1
Make PROGMEM configurable // Resolve #606, Resolve #482
2022-04-22 07:15:29 -04:00
e85f439c98 List Unity framework in PlatformIO Registry 2022-04-22 13:43:32 +03:00
be657105e5 Make PROGMEM configurable // Resolve #606, Resolve #482 2022-04-22 13:31:07 +03:00
4389bab82e Support option to specify array length of zero to force pointer comparison. 2022-04-19 17:27:31 -04:00
0df1d442cb Rearrange details to always print if given, no matter if another msg added or not.
Print output on failures no matter if verbose or not.
Enforce that HEX comparisons are unsigned comparisons.
2022-04-19 16:21:04 -04:00
b9e9268d92 Merge pull request #601 from AJIOB/py_import_fixing
unity_to_junit.py can be imported as Python module now
2022-03-21 06:58:14 -04:00
8286aaf32c Merge pull request #603 from AJIOB/fixing_hex16_error
Fixing overflow false error detection on 32, 16 & 8 bit arrays withins
2022-03-14 06:47:46 -04:00
dc66709552 Merge pull request #604 from AJIOB/old_windows_sdk_fix
Fixing noreturn usage on old Windows SDKs with new MSVC compiler.

Thanks Alex! Sorry about the delay!
2022-03-14 06:46:40 -04:00
79644b6242 Fixing noreturn usage on old Windows SDKs with new MSVC 2022-03-04 16:20:55 +03:00
9db619d6dc Using C90 style comments 2022-03-04 14:49:29 +03:00
b770a519a0 Fixing overflow false error detection on 32, 16 & 8 bit arrays withins 2022-03-04 14:45:47 +03:00
824eb5f5c5 Fixing Rubocop code style 2022-02-28 16:59:52 +03:00
2dbfd0594c Adding time feature description 2022-02-28 16:11:32 +03:00
42503b3343 unity_to_junit.py can be imported as Python module now 2022-02-28 14:12:57 +03:00
32608af4f5 Test passing time will be in seconds now
(for xml output)

(cherry picked from commit 39d54e2913b0c3a18106a13705fed2fb8ab7f4b0)
2022-02-28 14:06:59 +03:00
edf6a52bfd Test time parsing was added
(cherry picked from commit f2fe9fd4ad78c574af08afaa91d402b37464b131)
2022-02-28 14:06:53 +03:00
db878ccaed Merge pull request #600 from 6arms1leg/fix-type-qual
Fix "clobbered variable" compiler warning (`-Wclobbered`)
2022-02-21 08:48:18 -05:00
72f30d82e4 Add missing volatile type qualifier
... to fix "clobbered variable" compiler warning (`-Wclobbered`).
2022-02-21 14:10:10 +01:00