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

48 Commits

Author SHA1 Message Date
Mark VanderVoord
51d2db98e2 Merge pull request #815 from JamesB192/master
🐛🐧 Try build Unity w/ -DUNITY_EXCLUDE_FLOAT_PRINT
2025-11-12 09:50:31 -05:00
James Browning
747c2ee73f Misadress style CI bot failure, my bad 2025-11-12 05:19:20 -08:00
James Browning
18c4e93767 Try build Unity w/ -UUNITY_EXCLUDE_FLOAT_PRINT 2025-11-12 04:50:06 -08:00
Mark VanderVoord
d89dafa413 Merge pull request #812 from savashn/table-of-contents
[docs] Add table of contents in Unity Assertions Reference
2025-10-27 09:42:53 -04:00
savashn
3240ac9811 add table of contents in docs 2025-10-27 10:06:33 +03:00
Mark VanderVoord
36e9b197ec Merge pull request #806 from RolandMarchand/ansi-c-comments
Convert C++ comments to ANSI C style
2025-09-29 16:16:46 -04:00
Roland Marchand
864b4ea554 Convert C++ comments to ANSI C style 2025-09-25 21:22:51 -04:00
Mark VanderVoord
0d7ea70b55 Merge pull request #798 from ml-physec/fix-details-print
Update detail-stack implementation after #784
2025-08-07 09:51:31 -04:00
ml-physec
25e9af9edd Update detail-stack implementation after #784 2025-08-07 13:52:40 +02:00
Mark VanderVoord
bddb1366a2 Merge pull request #769 from rsmyth-ecmi/MesonConfig
Add some more Meson config options
2025-07-10 13:53:28 -04:00
Mark VanderVoord
04f3d38892 Merge pull request #771 from rsmyth-ecmi/MesonFix
Fix meson pkg-config generation
2025-07-10 13:53:04 -04:00
Mark VanderVoord
3ba2bb9b27 Merge pull request #790 from rsmyth-ecmi/shebangFix
Fix up shebangs in the auto directory
2025-07-10 13:52:27 -04:00
Mark VanderVoord
0bc0fed904 Merge pull request #784 from burakutkuc/fix-assert-uint-overflow
fix: Correct UINT max value handling (thanks @burakutkuc!)
2025-07-10 08:35:42 -04:00
burakutkuc
f96b64f552 fix: fixed error from regression test results; removed the unnecessary int-uint distinction for hex values in the "array within" feature. 2025-07-10 13:35:15 +03:00
Mark VanderVoord
eb79bce1b5 Bump version to encapsulate recent changes. 2025-07-09 17:00:30 -04:00
Mark VanderVoord
fe8d1e9911 Merge pull request #792 from RossSmyth/errors
Fix up some warnings/errors
2025-07-09 15:47:35 -04:00
Ross Smyth
12705bf83f Remove warning without emits 2025-07-09 15:30:01 -04:00
Mark VanderVoord
fa03368cae Merge pull request #775 from ml-physec/more-details
Detail-Stack API
2025-07-09 15:23:44 -04:00
Ross Smyth
4a59f29362 Fix -Wmissing-prototypes errors
This one was a bit tough, but I think this works fine.
2025-07-09 15:20:47 -04:00
Ross Smyth
6decd7aa29 Wno-unused-macros and Wno-padded don't emit anything 2025-07-09 15:17:56 -04:00
Ross Smyth
faaaaa4fca Fix Wmissing-noreturn errors 2025-07-09 15:17:56 -04:00
Ross Smyth
8bac36463d Fix reserved-identifier errors
These are reserved by the standard
2025-07-09 15:17:56 -04:00
Ross Smyth
1638627cb5 Fix -Wextra-semi-stmt error with proper macro hygiene
"empty expression statement has no effect; remove unnecessary ';'"

These macros were not properly wrapped
2025-07-09 15:17:56 -04:00
Ross Smyth
442a060acd Fix clang errors in makefile 2025-07-02 21:13:09 -04:00
Ross Smyth
e4942f1a21 Fix up shebangs in the auto directory 2025-06-25 14:42:53 -04:00
Ross Smyth
4c8dab0edd Fix meson pkg-config generation
The pkg-config file does not include the subdir
in its build flags, so files will fail to find the
Unity headers.
2025-06-25 12:30:26 -04:00
burakutkuc
6a3fc440e3 fix: Add casts in function-like macros for type safety 2025-06-13 16:43:35 +03:00
burakutkuc
ac52c4182a fix: Fail when values are equal but equality is not allowed. Handled HEX asserts as unsigned; applied the same unsigned logic across all integer-based comparisons. 2025-06-13 16:25:22 +03:00
Buccno
bcb0746186 fix: Correct UINT max value handling 2025-06-05 11:00:57 +03:00
Mark VanderVoord
b9d897b5f3 Merge pull request #783 from rstahn/patch-1
Cleanup definition of UNITY_COMPARISON_T in unity_internals.h
2025-05-28 12:05:50 -04:00
Roland Stahn
50c37200b9 Fix definition of UNITY_NOT_EQUAL in unity_internals.h 2025-05-28 10:07:04 +02:00
Roland Stahn
5edda03c78 Cleanup definition of UNITY_COMPARISON_T in unity_internals.h
remove unused values UNITY_WITHIN and UNITY_UNKNOWN
update value UNITY_NOT_EQUAL
2025-05-28 09:55:17 +02:00
Mark VanderVoord
48fbee97f7 Merge pull request #781 from rstahn/patch-1
Extend UNITY_NORETURN mapping for (older) IAR compilers
2025-05-27 10:17:35 -04:00
Roland Stahn
3fb2484313 Add IAR specific mapping for UNITY_NORETURN 2025-05-27 14:33:15 +02:00
Mark VanderVoord
9578ffd885 Merge pull request #778 from yahyayozo/master
[Docs] Fix typos in docs files (Thanks for your help, @yahyayozo ! I appreciate it!)
2025-04-25 21:35:04 -04:00
yahyayozo
69478185a3 [Docs] Fix typos in docs files 2025-04-19 18:54:28 +01:00
ml-physec
bfc785c665 Add example 2025-04-16 19:21:48 +02:00
ml-physec
c359bf37b0 Initial implementation 2025-04-16 19:21:33 +02:00
Mark VanderVoord
23e8edbd64 Merge pull request #714 from jamestiotio/shuffle_tests
Add support for randomizing test execution order
2025-03-31 10:04:14 -04:00
Mark VanderVoord
64e68d9dda Merge pull request #772 from gr33kdude/master
Fix minor typo
2025-03-24 09:14:02 -04:00
Costas Akrivoulis
19da6e196b Fix minor typo 2025-03-23 22:20:34 -07:00
James Raphael Tiovalen
b0bcdb56c1 Add support for randomizing test execution order
This commit reintroduces the option to shuffle the test execution order
into the test runner. This has been tested with the temp_sensor example
project in Ceedling. Unit tests have also been successfully executed.

Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com>
2025-03-11 00:10:05 +08:00
Ross Smyth
8badc0e070 Add fixture help message option for UNITY_CUSTOM_HELP_MSG 2025-03-05 16:31:34 -05:00
Ross Smyth
0921c263f4 Allow the memory extra and fixture extra to be enabled seperatly. 2025-03-05 16:22:46 -05:00
Mark VanderVoord
cdf1d0297e Create FUNDING.yml 2025-02-17 09:14:39 -05:00
Mark VanderVoord
ce122c4d8a Merge pull request #762 from koy-rehme-bae/fixtures_command_line_arguments
New command line options for fixtures
2025-01-21 14:43:33 -05:00
Rehme, Koy
df0b5d90b8 Add unit tests for new switches 2025-01-18 17:45:21 -07:00
Koy Rehme
459d53a821 New command line options 2025-01-08 15:38:23 -07:00
32 changed files with 1052 additions and 293 deletions

13
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
github: ThrowTheSwitch
#patreon: # Replace with a single Patreon username
#open_collective: # Replace with a single Open Collective username
#ko_fi: # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
#liberapay: # Replace with a single Liberapay username
#issuehunt: # Replace with a single IssueHunt username
#lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
#polar: # Replace with a single Polar username
#buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
#thanks_dev: # Replace with a single thanks.dev username
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

View File

@@ -75,7 +75,7 @@ Like INT, there are variants for different sizes also.
Compares two integers for equality and display errors as hexadecimal. Compares two integers for equality and display errors as hexadecimal.
Like the other integer comparisons, you can specify the size... Like the other integer comparisons, you can specify the size...
here the size will also effect how many nibbles are shown (for example, `HEX16` will show 4 nibbles). here the size will also affect how many nibbles are shown (for example, `HEX16` will show 4 nibbles).
TEST_ASSERT_EQUAL(expected, actual) TEST_ASSERT_EQUAL(expected, actual)

View File

@@ -1,4 +1,4 @@
#!/usr/bin/ruby #!/usr/bin/env ruby
# ========================================================================= # =========================================================================
# Unity - A Test Framework for C # Unity - A Test Framework for C
# ThrowTheSwitch.org # ThrowTheSwitch.org
@@ -47,7 +47,9 @@ class UnityTestRunnerGenerator
use_param_tests: false, use_param_tests: false,
use_system_files: true, use_system_files: true,
include_extensions: '(?:hpp|hh|H|h)', include_extensions: '(?:hpp|hh|H|h)',
source_extensions: '(?:cpp|cc|ino|C|c)' source_extensions: '(?:cpp|cc|ino|C|c)',
shuffle_tests: false,
rng_seed: 0
} }
end end
@@ -90,6 +92,7 @@ class UnityTestRunnerGenerator
def generate(input_file, output_file, tests, used_mocks, testfile_includes) def generate(input_file, output_file, tests, used_mocks, testfile_includes)
File.open(output_file, 'w') do |output| File.open(output_file, 'w') do |output|
create_header(output, used_mocks, testfile_includes) create_header(output, used_mocks, testfile_includes)
create_run_test_params_struct(output)
create_externs(output, tests, used_mocks) create_externs(output, tests, used_mocks)
create_mock_management(output, used_mocks) create_mock_management(output, used_mocks)
create_setup(output) create_setup(output)
@@ -99,6 +102,7 @@ class UnityTestRunnerGenerator
create_reset(output) create_reset(output)
create_run_test(output) unless tests.empty? create_run_test(output) unless tests.empty?
create_args_wrappers(output, tests) create_args_wrappers(output, tests)
create_shuffle_tests(output) if @options[:shuffle_tests]
create_main(output, input_file, tests, used_mocks) create_main(output, input_file, tests, used_mocks)
end end
@@ -231,10 +235,34 @@ class UnityTestRunnerGenerator
@options[:has_suite_teardown] ||= (source =~ /int\s+suiteTearDown\s*\(int\s+([a-zA-Z0-9_])+\s*\)/) @options[:has_suite_teardown] ||= (source =~ /int\s+suiteTearDown\s*\(int\s+([a-zA-Z0-9_])+\s*\)/)
end end
def count_tests(tests)
if @options[:use_param_tests]
idx = 0
tests.each do |test|
if (test[:args].nil? || test[:args].empty?)
idx += 1
else
test[:args].each do |args|
idx += 1
end
end
end
return idx
else
return tests.size
end
end
def create_header(output, mocks, testfile_includes = []) def create_header(output, mocks, testfile_includes = [])
output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */') output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
output.puts("\n/*=======Automagically Detected Files To Include=====*/") output.puts("\n/*=======Automagically Detected Files To Include=====*/")
output.puts('extern "C" {') if @options[:externcincludes] output.puts('extern "C" {') if @options[:externcincludes]
if @options[:shuffle_tests]
output.puts('#include <stdlib.h>')
if @options[:rng_seed] == 0
output.puts('#include <time.h>')
end
end
output.puts("#include \"#{@options[:framework]}.h\"") output.puts("#include \"#{@options[:framework]}.h\"")
output.puts('#include "cmock.h"') unless mocks.empty? output.puts('#include "cmock.h"') unless mocks.empty?
output.puts('}') if @options[:externcincludes] output.puts('}') if @options[:externcincludes]
@@ -270,6 +298,16 @@ class UnityTestRunnerGenerator
output.puts('char* GlobalOrderError;') output.puts('char* GlobalOrderError;')
end end
def create_run_test_params_struct(output)
output.puts("\n/*=======Structure Used By Test Runner=====*/")
output.puts('struct UnityRunTestParameters')
output.puts('{')
output.puts(' UnityTestFunction func;')
output.puts(' const char* name;')
output.puts(' UNITY_LINE_TYPE line_num;')
output.puts('};')
end
def create_externs(output, tests, _mocks) def create_externs(output, tests, _mocks)
output.puts("\n/*=======External Functions This Runner Calls=====*/") output.puts("\n/*=======External Functions This Runner Calls=====*/")
output.puts("extern void #{@options[:setup_name]}(void);") output.puts("extern void #{@options[:setup_name]}(void);")
@@ -392,6 +430,22 @@ class UnityTestRunnerGenerator
end end
end end
def create_shuffle_tests(output)
output.puts("\n/*=======Shuffle Test Order=====*/")
output.puts('static void shuffleTests(struct UnityRunTestParameters run_test_params_arr[], int num_of_tests)')
output.puts('{')
# Use Fisher-Yates shuffle algorithm
output.puts(' for (int i = num_of_tests - 1; i > 0; i--)')
output.puts(' {')
output.puts(' int j = rand() % (i + 1);')
output.puts(' struct UnityRunTestParameters temp = run_test_params_arr[i];')
output.puts(' run_test_params_arr[i] = run_test_params_arr[j];')
output.puts(' run_test_params_arr[j] = temp;')
output.puts(' }')
output.puts('}')
end
def create_main(output, filename, tests, used_mocks) def create_main(output, filename, tests, used_mocks)
output.puts("\n/*=======MAIN=====*/") output.puts("\n/*=======MAIN=====*/")
main_name = @options[:main_name].to_sym == :auto ? "main_#{filename.gsub('.c', '')}" : (@options[:main_name]).to_s main_name = @options[:main_name].to_sym == :auto ? "main_#{filename.gsub('.c', '')}" : (@options[:main_name]).to_s
@@ -439,18 +493,46 @@ class UnityTestRunnerGenerator
else else
output.puts(" UnityBegin(\"#{filename.gsub(/\\/, '\\\\\\')}\");") output.puts(" UnityBegin(\"#{filename.gsub(/\\/, '\\\\\\')}\");")
end end
if @options[:shuffle_tests]
output.puts
if @options[:rng_seed] == 0
output.puts(' srand(time(NULL));')
else
output.puts(" srand(#{@options[:rng_seed]});")
end
end
output.puts
output.puts(" int number_of_tests = #{count_tests(tests)};")
output.puts(' struct UnityRunTestParameters run_test_params_arr[number_of_tests];')
output.puts
idx = 0
tests.each do |test| tests.each do |test|
if (!@options[:use_param_tests]) || test[:args].nil? || test[:args].empty? if (!@options[:use_param_tests]) || test[:args].nil? || test[:args].empty?
output.puts(" run_test(#{test[:test]}, \"#{test[:test]}\", #{test[:line_number]});") output.puts(" run_test_params_arr[#{idx}].func = #{test[:test]};")
output.puts(" run_test_params_arr[#{idx}].name = \"#{test[:test]}\";")
output.puts(" run_test_params_arr[#{idx}].line_num = #{test[:line_number]};")
idx += 1
else else
test[:args].each.with_index(1) do |args, idx| test[:args].each.with_index(1) do |args, arg_idx|
wrapper = "runner_args#{idx}_#{test[:test]}" wrapper = "runner_args#{arg_idx}_#{test[:test]}"
testname = "#{test[:test]}(#{args})".dump testname = "#{test[:test]}(#{args})".dump
output.puts(" run_test(#{wrapper}, #{testname}, #{test[:line_number]});") output.puts(" run_test_params_arr[#{idx}].func = #{wrapper};")
output.puts(" run_test_params_arr[#{idx}].name = #{testname};")
output.puts(" run_test_params_arr[#{idx}].line_num = #{test[:line_number]};")
idx += 1
end end
end end
end end
output.puts output.puts
if @options[:shuffle_tests]
output.puts(' shuffleTests(run_test_params_arr, number_of_tests);')
output.puts
end
output.puts(' for (int i = 0; i < number_of_tests; i++)')
output.puts(' {')
output.puts(' run_test(run_test_params_arr[i].func, run_test_params_arr[i].name, run_test_params_arr[i].line_num);')
output.puts(' }')
output.puts
output.puts(' CMock_Guts_MemFreeFinal();') unless used_mocks.empty? output.puts(' CMock_Guts_MemFreeFinal();') unless used_mocks.empty?
if @options[:has_suite_teardown] if @options[:has_suite_teardown]
if @options[:omit_begin_end] if @options[:omit_begin_end]
@@ -536,7 +618,9 @@ if $0 == __FILE__
' --suite_teardown="" - code to execute for teardown of entire suite', ' --suite_teardown="" - code to execute for teardown of entire suite',
' --use_param_tests=1 - enable parameterized tests (disabled by default)', ' --use_param_tests=1 - enable parameterized tests (disabled by default)',
' --omit_begin_end=1 - omit calls to UnityBegin and UNITY_END (disabled by default)', ' --omit_begin_end=1 - omit calls to UnityBegin and UNITY_END (disabled by default)',
' --header_file="" - path/name of test header file to generate too'].join("\n") ' --header_file="" - path/name of test header file to generate too',
' --shuffle_tests=1 - enable shuffling of the test execution order (disabled by default)',
' --rng_seed=1 - seed value for randomization of test execution order'].join("\n")
exit 1 exit 1
end end

View File

@@ -1,4 +1,4 @@
#! python3 #!/usr/bin/env python3
# ========================================================================= # =========================================================================
# Unity - A Test Framework for C # Unity - A Test Framework for C
# ThrowTheSwitch.org # ThrowTheSwitch.org

View File

@@ -1,4 +1,4 @@
#!/usr/bin/ruby #!/usr/bin/env ruby
# ========================================================================= # =========================================================================
# Unity - A Test Framework for C # Unity - A Test Framework for C
# ThrowTheSwitch.org # ThrowTheSwitch.org

View File

@@ -1,4 +1,4 @@
#! python3 #!/usr/bin/env python3
# ========================================================================= # =========================================================================
# Unity - A Test Framework for C # Unity - A Test Framework for C
# ThrowTheSwitch.org # ThrowTheSwitch.org

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env ruby
# ========================================================================= # =========================================================================
# Unity - A Test Framework for C # Unity - A Test Framework for C
# ThrowTheSwitch.org # ThrowTheSwitch.org
@@ -5,7 +6,6 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# ========================================================================= # =========================================================================
# !/usr/bin/ruby
# #
# unity_test_summary.rb # unity_test_summary.rb
# #

View File

@@ -90,7 +90,7 @@ Take a look through the file names in Ceedling and you'll get a good idea of wha
Why use preprocess when you can use preprocessinator? Why use preprocess when you can use preprocessinator?
Or what better describes a module in charge of invoking tasks during releases than release_invoker? Or what better describes a module in charge of invoking tasks during releases than release_invoker?
Don't get carried away. Don't get carried away.
The names are still descriptive and fulfil the above requirements, but they don't feel stale. The names are still descriptive and fulfill the above requirements, but they don't feel stale.
## C and C++ Details ## C and C++ Details

View File

@@ -1,5 +1,35 @@
# Unity Assertions Reference # Unity Assertions Reference
## Table of Contents
1. [Background and Overview](#background-and-overview)
1. [Super Condensed Version](#super-condensed-version)
2. [Unity Is Several Things But Mainly Its Assertions](#unity-is-several-things-but-mainly-its-assertions)
3. [Whats an Assertion?](#whats-an-assertion)
4. [Unitys Assertions: Helpful Messages _and_ Free Source Code Documentation](#unitys-assertions-helpful-messages-and-free-source-code-documentation)
2. [Assertion Conventions and Configurations](#assertion-conventions-and-configurations)
1. [Naming and Parameter Conventions](#naming-and-parameter-conventions)
2. [TEST_ASSERT_EACH_EQUAL_X Variants](#test_assert_each_equal_x-variants)
3. [Configuration](#configuration)
3. [The Assertions in All Their Blessed Glory](#the-assertions-in-all-their-blessed-glory)
1. [Basic Fail, Pass and Ignore](#basic-fail-pass-and-ignore)
2. [Boolean](#boolean)
3. [Signed and Unsigned Integers (of all sizes)](#signed-and-unsigned-integers-of-all-sizes)
4. [Unsigned Integers (of all sizes) in Hexadecimal](#unsigned-integers-of-all-sizes-in-hexadecimal)
5. [Characters](#characters)
6. [Masked and Bit-level Assertions](#masked-and-bit-level-assertions)
7. [Integer Less Than / Greater Than](#integer-less-than--greater-than)
8. [Integer Ranges (of all sizes)](#integer-ranges-of-all-sizes)
9. [Structs and Strings](#structs-and-strings)
10. [Arrays](#arrays)
11. [Integer Array Ranges (of all sizes)](#integer-array-ranges-of-all-sizes)
12. [Each Equal (Arrays to Single Value)](#each-equal-arrays-to-single-value)
13. [Floating Point (If enabled)](#floating-point-if-enabled)
14. [Double (If enabled)](#double-if-enabled)
4. [Advanced Asserting: Details On Tricky Assertions](#advanced-asserting-details-on-tricky-assertions)
1. [How do the EQUAL assertions work for FLOAT and DOUBLE?](#how-do-the-equal-assertions-work-for-float-and-double)
2. [How do we deal with targets with non-standard int sizes?](#how-do-we-deal-with-targets-with-non-standard-int-sizes)
## Background and Overview ## Background and Overview
### Super Condensed Version ### Super Condensed Version

View File

@@ -33,7 +33,7 @@ In either case, you've got a couple choices for configuring these options:
Unfortunately, it doesn't usually work well to just #define these things in the test itself. Unfortunately, it doesn't usually work well to just #define these things in the test itself.
These defines need to take effect where ever unity.h is included. These defines need to take effect where ever unity.h is included.
This would be test test, the test runner (if you're generating one), and from unity.c when it's compiled. This would be the test, the test runner (if you're generating one), and from unity.c when it's compiled.
## The Options ## The Options

View File

@@ -94,12 +94,12 @@ UnityTestRunnerGenerator.new.run(testfile, runner_name, options)
``` ```
If you have multiple files to generate in a build script (such as a Rakefile), you might want to instantiate a generator object with your options and call it to generate each runner afterwards. If you have multiple files to generate in a build script (such as a Rakefile), you might want to instantiate a generator object with your options and call it to generate each runner afterwards.
Like thus: Like this:
```Ruby ```Ruby
gen = UnityTestRunnerGenerator.new(options) gen = UnityTestRunnerGenerator.new(options)
test_files.each do |f| test_files.each do |f|
gen.run(f, File.basename(f,'.c')+"Runner.c" gen.run(f, File.basename(f,'.c')+"Runner.c")
end end
``` ```
@@ -205,7 +205,7 @@ Few usage examples can be found in `/test/tests/test_unity_parameterized.c` file
You should define `UNITY_SUPPORT_TEST_CASES` macro for tests success compiling, You should define `UNITY_SUPPORT_TEST_CASES` macro for tests success compiling,
if you enable current option. if you enable current option.
You can see list of supported macros list in the You can see a list of supported macros in the
[Parameterized tests provided macros](#parameterized-tests-provided-macros) [Parameterized tests provided macros](#parameterized-tests-provided-macros)
section that follows. section that follows.
@@ -277,13 +277,29 @@ Unity test state setup and cleanup.
This option can also be specified at the command prompt as `--omit_begin_end` This option can also be specified at the command prompt as `--omit_begin_end`
##### `:shuffle_tests`
If `true`, the test execution order will be shuffled. Is `false` by default.
This option can also be specified at the command prompt as `--shuffle_tests`
##### `:rng_seed`
If set to some positive integer value, said value will be used as the seed value passed
to the `srand` function. Otherwise, if not set to any value, `time(NULL)` will be used
as the seed value.
Only applicable if `:shuffle_tests` is set to `true`.
This option can also be specified at the command prompt as `--rng_seed`
#### Parameterized tests provided macros #### Parameterized tests provided macros
Unity provides support for few param tests generators, that can be combined Unity provides support for few param tests generators, that can be combined
with each other. You must define test function as usual C function with usual with each other. You must define test function as usual C function with usual
C arguments, and test generator will pass what you tell as a list of arguments. C arguments, and test generator will pass what you tell as a list of arguments.
Let's show how all of them works on the following test function definitions: Let's show how all of them work on the following test function definitions:
```C ```C
/* Place your test generators here, usually one generator per one or few lines */ /* Place your test generators here, usually one generator per one or few lines */
@@ -385,17 +401,17 @@ TEST_CASE(4, 6, 30)
Test matix is an advanced generator. It single call can be converted to zero, Test matix is an advanced generator. It single call can be converted to zero,
one or few `TEST_CASE` equivalent commands. one or few `TEST_CASE` equivalent commands.
That generator will create tests for all cobinations of the provided list. Each argument has to be given as a list of one or more elements in the format `[<parm1>, <param2>, ..., <paramN-1>, <paramN>]`. That generator will create tests for all combinations of the provided list. Each argument has to be given as a list of one or more elements in the format `[<parm1>, <param2>, ..., <paramN-1>, <paramN>]`.
All parameters supported by the `TEST_CASE` is supported as arguments: All parameters supported by the `TEST_CASE` are supported as arguments:
- Numbers incl type specifiers e.g. `<1>`, `<1u>`, `<1l>`, `<2.3>`, or `<2.3f>` - Numbers incl type specifiers e.g. `<1>`, `<1u>`, `<1l>`, `<2.3>`, or `<2.3f>`
- Strings incl string concatianion e.g. `<"string">`, or `<"partial" "string">` - Strings incl string concatenation e.g. `<"string">`, or `<"partial" "string">`
- Chars e.g. `<'c'>` - Chars e.g. `<'c'>`
- Enums e.g. `<ENUM_NAME>` - Enums e.g. `<ENUM_NAME>`
- Elements of arrays e.g. `<data[0]>` - Elements of arrays e.g. `<data[0]>`
Let's use our `test_demoParamFunction` test for checking, what ranges Let's use our `test_demoParamFunction` test for checking what ranges
will be generated for our single `TEST_RANGE` row: will be generated for our single `TEST_MATRIX` row:
```C ```C
TEST_MATRIX([3, 4, 7], [10, 8, 2, 1],[30u, 20.0f]) TEST_MATRIX([3, 4, 7], [10, 8, 2, 1],[30u, 20.0f])
@@ -434,11 +450,11 @@ As we can see:
| Parameter | Format | Count of values | | Parameter | Format | Count of values |
|---|---|---| |---|---|---|
| `a` | `[3, 4, 7]` | 2 | | `a` | `[3, 4, 7]` | 3 |
| `b` | `[10, 8, 2, 1]` | 4 | | `b` | `[10, 8, 2, 1]` | 4 |
| `c` | `[30u, 20.0f]` | 2 | | `c` | `[30u, 20.0f]` | 2 |
We totally have 2 * 4 * 2 = 16 equal test cases, that can be written as following: We totally have 3 * 4 * 2 = 24 equal test cases, that can be written as following:
```C ```C
TEST_CASE(3, 10, 30u) TEST_CASE(3, 10, 30u)
@@ -500,7 +516,7 @@ ruby unity_test_summary.rb build/test/ ~/projects/myproject/
Or, if you're more of a Windows sort of person: Or, if you're more of a Windows sort of person:
```Shell ```Shell
ruby unity_test_summary.rb build\teat\ C:\projects\myproject\ ruby unity_test_summary.rb build\test\ C:\projects\myproject\
``` ```
When configured correctly, you'll see a final summary, like so: When configured correctly, you'll see a final summary, like so:

View File

@@ -0,0 +1,63 @@
# =========================================================================
# Unity - A Test Framework for C
# ThrowTheSwitch.org
# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams
# SPDX-License-Identifier: MIT
# =========================================================================
#We try to detect the OS we are running on, and adjust commands as needed
ifeq ($(OS),Windows_NT)
ifeq ($(shell uname -s),) # not in a bash-like shell
CLEANUP = del /F /Q
MKDIR = mkdir
else # in a bash-like shell, like msys
CLEANUP = rm -f
MKDIR = mkdir -p
endif
TARGET_EXTENSION=.exe
else
CLEANUP = rm -f
MKDIR = mkdir -p
TARGET_EXTENSION=.out
endif
C_COMPILER=gcc
ifeq ($(shell uname -s), Darwin)
C_COMPILER=clang
endif
UNITY_ROOT=../..
CFLAGS=-std=c89
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -Wpointer-arith
CFLAGS += -Wcast-align
CFLAGS += -Wwrite-strings
CFLAGS += -Wswitch-default
CFLAGS += -Wunreachable-code
CFLAGS += -Winit-self
CFLAGS += -Wmissing-field-initializers
CFLAGS += -Wno-unknown-pragmas
CFLAGS += -Wstrict-prototypes
CFLAGS += -Wundef
CFLAGS += -Wold-style-definition
#CFLAGS += -Wno-misleading-indentation
TARGET_BASE1=test1
TARGET1 = $(TARGET_BASE1)$(TARGET_EXTENSION)
SRC_FILES1=$(UNITY_ROOT)/src/unity.c src/ProductionCode.c test/TestProductionCode.c test/test_runners/TestProductionCode_Runner.c
INC_DIRS=-Isrc -I$(UNITY_ROOT)/src
SYMBOLS=-include"test/unity_detail_config.h" -DUNIT_TESTING
all: clean default
default: $(SRC_FILES1)
$(C_COMPILER) $(CFLAGS) $(INC_DIRS) $(SYMBOLS) $(SRC_FILES1) -o $(TARGET1)
- ./$(TARGET1)
clean:
$(CLEANUP) $(TARGET1) $(TARGET2)
ci: CFLAGS += -Werror
ci: default

View File

@@ -0,0 +1,38 @@
Example 5
=========
Demonstrate Details Stack usage to implement something similar to a stacktrace.
This allows locating the error source much faster in branching/iterating code.
Build and run with Make
---
Just run `make`.
Output
---
Below the output is annotated with source of the elements.
```
test/TestProductionCode.c:36:test_BitExtractor:FAIL: Expected 0 Was 1. During call BitExtractor. During call BitExtractor_down. Bit Position 6. Bit Mask 0x02. Unexpected bit value
```
| String | Source |
|-----------------------------|---------------------------------------------------------------------------|
| `test/TestProductionCode.c` | `Unity.TestFile` |
| `36` | `UNITY_TEST_ASSERT_EQUAL_INT` line |
| `test_BitExtractor` | `RUN_TEST` name |
| `FAIL` | `UnityStrFail` |
| `Expected 1 Was 0` | `UnityAssertEqualNumber` |
| `During call` | Detail 0, Label |
| `BitExtractor` | Detail 0, Value |
| `During call` | Detail 0, Label |
| `BitExtractor` | Detail 0, Value |
| `During call` | Detail 1, Label |
| `BitExtractor_down` | Detail 1, Value |
| `Bit Position` | Detail 2, Label (literal starts with #\x18, so value is printed as INT32) |
| `6` | Detail 2 Value |
| `Bit Mask` | Detail 2, Label (literal starts with #\x41, so value is printed as HEX8) |
| `0x02` | Detail 2 Value |
| `Unexpected bit value` | `UNITY_TEST_ASSERT_EQUAL_INT` message |
While this example is a bit contrived, the source of the error can be clearly located to be within the `test_BitExtractor->BitExtractor->BitExtractor_down`

View File

@@ -0,0 +1,56 @@
/* =========================================================================
Unity - A Test Framework for C
ThrowTheSwitch.org
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
SPDX-License-Identifier: MIT
========================================================================= */
#include "ProductionCode.h"
#include <stdint.h>
#ifdef UNIT_TESTING
#include "unity.h"
#else
/* No-Op when not testing */
#define UNITY_DETAIL_PUSH
#define UNITY_DETAIL_POP
#endif
static void BitExtractor_up(uint8_t input, callback_t cb)
{
int32_t pos;
UNITY_DETAIL_PUSH(UNITY_DETAIL_CALL, __FUNCTION__);
for(pos=0; pos<8; pos++) {
UNITY_DETAIL_PUSH(UNITY_DETAIL_BIT_POS, pos);
UNITY_DETAIL_PUSH(UNITY_DETAIL_BIT_MASK, 1<<pos);
cb(pos, !!(input & (1<<pos)));
UNITY_DETAIL_POP(UNITY_DETAIL_BIT_MASK, 1<<pos);
UNITY_DETAIL_POP(UNITY_DETAIL_BIT_POS, pos);
}
UNITY_DETAIL_POP(UNITY_DETAIL_CALL, __FUNCTION__);
}
static void BitExtractor_down(uint8_t input, callback_t cb)
{
int32_t pos;
UNITY_DETAIL_PUSH(UNITY_DETAIL_CALL, __FUNCTION__);
for(pos=0; pos<8; pos++) {
UNITY_DETAIL_PUSH(UNITY_DETAIL_BIT_POS, pos);
UNITY_DETAIL_PUSH(UNITY_DETAIL_BIT_MASK, 0x80>>pos);
cb(pos, !!(input & (0x80>>pos)));
UNITY_DETAIL_POP(UNITY_DETAIL_BIT_MASK, 0x80>>pos);
UNITY_DETAIL_POP(UNITY_DETAIL_BIT_POS, pos);
}
UNITY_DETAIL_POP(UNITY_DETAIL_CALL, __FUNCTION__);
}
void BitExtractor(bit_direction_t dir, uint8_t input, callback_t cb)
{
UNITY_DETAIL_PUSH(UNITY_DETAIL_CALL, __FUNCTION__);
if(dir == BIT_DIRECTION_UP) {
BitExtractor_up(input, cb);
} else {
BitExtractor_down(input, cb);
}
UNITY_DETAIL_POP(UNITY_DETAIL_CALL, __FUNCTION__);
}

View File

@@ -0,0 +1,16 @@
/* =========================================================================
Unity - A Test Framework for C
ThrowTheSwitch.org
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
SPDX-License-Identifier: MIT
========================================================================= */
#include <stdint.h>
typedef void callback_t(int position, int bit_value);
typedef enum {
BIT_DIRECTION_UP,
BIT_DIRECTION_DOWN,
} bit_direction_t;
void BitExtractor(bit_direction_t dir, uint8_t input, callback_t cb);

View File

@@ -0,0 +1,3 @@
[wrap-git]
url = https://github.com/ThrowTheSwitch/Unity.git
revision = head

View File

@@ -0,0 +1,45 @@
/* =========================================================================
Unity - A Test Framework for C
ThrowTheSwitch.org
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
SPDX-License-Identifier: MIT
========================================================================= */
#include "ProductionCode.h"
#include "unity.h"
const int* current_expected_bits = NULL;
UNITY_LINE_TYPE current_vector_line = 0;
typedef struct {
UNITY_LINE_TYPE line;
uint8_t value;
bit_direction_t dir;
int expected_bits[8];
} test_vector_t;
void setUp(void)
{
}
void tearDown(void)
{
}
static void be_bit_tester(int position, int value) {
UNITY_TEST_ASSERT_EQUAL_INT(current_expected_bits[position], value, current_vector_line, "Unexpected bit value");
}
void test_BitExtractor(void)
{
const test_vector_t test_vectors[] = {
{__LINE__, 7, BIT_DIRECTION_UP, {1,1,1,0,0,0,0,0}},
{__LINE__, 7, BIT_DIRECTION_DOWN, {0,0,0,0,0,1,0,1}}, /* intentionally wrong to demonstrate detail output */
{0}
};
const test_vector_t* tv;
for (tv = test_vectors; tv->line; tv++) {
current_vector_line = tv->line;
current_expected_bits = tv->expected_bits;
BitExtractor(tv->dir, tv->value, be_bit_tester);
}
}

View File

@@ -0,0 +1,48 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */
/*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
setUp(); \
TestFunc(); \
} \
if (TEST_PROTECT()) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
/*=======Automagically Detected Files To Include=====*/
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
#include "ProductionCode.h"
/*=======External Functions This Runner Calls=====*/
extern void setUp(void);
extern void tearDown(void);
extern void test_BitExtractor(void);
/*=======Test Reset Option=====*/
void resetTest(void);
void resetTest(void)
{
tearDown();
setUp();
}
/*=======MAIN=====*/
int main(void)
{
UnityBegin("test/TestProductionCode.c");
RUN_TEST(test_BitExtractor, 32);
return UNITY_END();
}

View File

@@ -0,0 +1,18 @@
#define UNITY_DETAIL_STACK_SIZE 5
#define LABEL_AS_INT32 "#\x18" /*UNITY_DISPLAY_STYLE_INT32 = 0x18 */
#define LABEL_AS_HEX8 "#\x41" /* UNITY_DISPLAY_STYLE_HEX8 = 0x41 */
#define UNITY_DETAIL_LABEL_NAMES { 0, \
UNITY_DETAIL1_NAME, \
UNITY_DETAIL2_NAME, \
"During call", \
LABEL_AS_INT32 "Bit Position", \
LABEL_AS_HEX8 "Bit Mask", \
}
typedef enum {
UNITY_DETAIL_NONE = 0,
UNITY_DETAIL_D1 = 1,
UNITY_DETAIL_D2 = 2,
UNITY_DETAIL_CALL,
UNITY_DETAIL_BIT_POS,
UNITY_DETAIL_BIT_MASK,
} UNITY_DETAIL_LABEL_T;

View File

@@ -46,21 +46,25 @@ int UnityMain(int argc, const char* argv[], void (*runAllTests)(void))
return (int)Unity.TestFailures; return (int)Unity.TestFailures;
} }
static int selected(const char* filter, const char* name) static int selected(const char* filter, const char* select, const char* name)
{ {
if (filter == 0) if (filter == 0 && select == 0)
return 1; return 1;
return strstr(name, filter) ? 1 : 0; if (filter && strstr(name, filter))
return 1;
if (select && strcmp(name, select) == 0)
return 1;
return 0;
} }
static int testSelected(const char* test) static int testSelected(const char* test)
{ {
return selected(UnityFixture.NameFilter, test); return selected(UnityFixture.NameFilter, UnityFixture.Name, test);
} }
static int groupSelected(const char* group) static int groupSelected(const char* group)
{ {
return selected(UnityFixture.GroupFilter, group); return selected(UnityFixture.GroupFilter, UnityFixture.Group, group);
} }
void UnityTestRunner(unityfunction* setup, void UnityTestRunner(unityfunction* setup,
@@ -96,17 +100,20 @@ void UnityTestRunner(unityfunction* setup,
Unity.NumberOfTests++; Unity.NumberOfTests++;
UnityPointer_Init(); UnityPointer_Init();
UNITY_EXEC_TIME_START(); if (!UnityFixture.DryRun) {
UNITY_EXEC_TIME_START();
if (TEST_PROTECT()) if (TEST_PROTECT())
{ {
setup(); setup();
testBody(); testBody();
} }
if (TEST_PROTECT()) if (TEST_PROTECT())
{ {
teardown(); teardown();
}
} }
if (TEST_PROTECT()) if (TEST_PROTECT())
{ {
UnityPointer_UndoAllSets(); UnityPointer_UndoAllSets();
@@ -183,8 +190,11 @@ int UnityGetCommandLineOptions(int argc, const char* argv[])
int i; int i;
UnityFixture.Verbose = 0; UnityFixture.Verbose = 0;
UnityFixture.Silent = 0; UnityFixture.Silent = 0;
UnityFixture.DryRun = 0;
UnityFixture.GroupFilter = 0; UnityFixture.GroupFilter = 0;
UnityFixture.Group = 0;
UnityFixture.NameFilter = 0; UnityFixture.NameFilter = 0;
UnityFixture.Name = 0;
UnityFixture.RepeatCount = 1; UnityFixture.RepeatCount = 1;
if (argc == 1) if (argc == 1)
@@ -207,10 +217,16 @@ int UnityGetCommandLineOptions(int argc, const char* argv[])
UNITY_PRINT_EOL(); UNITY_PRINT_EOL();
UnityPrint(" -s Silent mode: minimal output showing only test failures"); UnityPrint(" -s Silent mode: minimal output showing only test failures");
UNITY_PRINT_EOL(); UNITY_PRINT_EOL();
UnityPrint(" -d Dry run all tests");
UNITY_PRINT_EOL();
UnityPrint(" -g NAME Only run tests in groups that contain the string NAME"); UnityPrint(" -g NAME Only run tests in groups that contain the string NAME");
UNITY_PRINT_EOL(); UNITY_PRINT_EOL();
UnityPrint(" -G NAME Only run tests in groups named NAME");
UNITY_PRINT_EOL();
UnityPrint(" -n NAME Only run tests whose name contains the string NAME"); UnityPrint(" -n NAME Only run tests whose name contains the string NAME");
UNITY_PRINT_EOL(); UNITY_PRINT_EOL();
UnityPrint(" -N NAME Only run tests named NAME");
UNITY_PRINT_EOL();
UnityPrint(" -r NUMBER Repeatedly run all tests NUMBER times"); UnityPrint(" -r NUMBER Repeatedly run all tests NUMBER times");
UNITY_PRINT_EOL(); UNITY_PRINT_EOL();
UnityPrint(" -h, --help Display this help message"); UnityPrint(" -h, --help Display this help message");
@@ -237,6 +253,11 @@ int UnityGetCommandLineOptions(int argc, const char* argv[])
UnityFixture.Silent = 1; UnityFixture.Silent = 1;
i++; i++;
} }
else if (strcmp(argv[i], "-d") == 0)
{
UnityFixture.DryRun = 1;
i++;
}
else if (strcmp(argv[i], "-g") == 0) else if (strcmp(argv[i], "-g") == 0)
{ {
i++; i++;
@@ -245,6 +266,14 @@ int UnityGetCommandLineOptions(int argc, const char* argv[])
UnityFixture.GroupFilter = argv[i]; UnityFixture.GroupFilter = argv[i];
i++; i++;
} }
else if (strcmp(argv[i], "-G") == 0)
{
i++;
if (i >= argc)
return 1;
UnityFixture.Group= argv[i];
i++;
}
else if (strcmp(argv[i], "-n") == 0) else if (strcmp(argv[i], "-n") == 0)
{ {
i++; i++;
@@ -253,6 +282,14 @@ int UnityGetCommandLineOptions(int argc, const char* argv[])
UnityFixture.NameFilter = argv[i]; UnityFixture.NameFilter = argv[i];
i++; i++;
} }
else if (strcmp(argv[i], "-N") == 0)
{
i++;
if (i >= argc)
return 1;
UnityFixture.Name = argv[i];
i++;
}
else if (strcmp(argv[i], "-r") == 0) else if (strcmp(argv[i], "-r") == 0)
{ {
UnityFixture.RepeatCount = 2; UnityFixture.RepeatCount = 2;

View File

@@ -17,9 +17,12 @@ struct UNITY_FIXTURE_T
{ {
int Verbose; int Verbose;
int Silent; int Silent;
int DryRun;
unsigned int RepeatCount; unsigned int RepeatCount;
const char* NameFilter; const char* NameFilter;
const char* Name;
const char* GroupFilter; const char* GroupFilter;
const char* Group;
}; };
extern struct UNITY_FIXTURE_T UnityFixture; extern struct UNITY_FIXTURE_T UnityFixture;

View File

@@ -90,23 +90,32 @@ TEST_GROUP(UnityCommandOptions);
static int savedVerbose; static int savedVerbose;
static unsigned int savedRepeat; static unsigned int savedRepeat;
static int savedDryRun;
static const char* savedName; static const char* savedName;
static const char* savedGroup; static const char* savedGroup;
static const char* savedNameExact;
static const char* savedGroupExact;
TEST_SETUP(UnityCommandOptions) TEST_SETUP(UnityCommandOptions)
{ {
savedVerbose = UnityFixture.Verbose; savedVerbose = UnityFixture.Verbose;
savedRepeat = UnityFixture.RepeatCount; savedRepeat = UnityFixture.RepeatCount;
savedDryRun = UnityFixture.DryRun;
savedName = UnityFixture.NameFilter; savedName = UnityFixture.NameFilter;
savedGroup = UnityFixture.GroupFilter; savedGroup = UnityFixture.GroupFilter;
savedNameExact = UnityFixture.Name;
savedGroupExact = UnityFixture.Group;
} }
TEST_TEAR_DOWN(UnityCommandOptions) TEST_TEAR_DOWN(UnityCommandOptions)
{ {
UnityFixture.Verbose = savedVerbose; UnityFixture.Verbose = savedVerbose;
UnityFixture.RepeatCount= savedRepeat; UnityFixture.RepeatCount= savedRepeat;
UnityFixture.DryRun = savedDryRun;
UnityFixture.NameFilter = savedName; UnityFixture.NameFilter = savedName;
UnityFixture.GroupFilter = savedGroup; UnityFixture.GroupFilter = savedGroup;
UnityFixture.Name= savedNameExact;
UnityFixture.Group= savedGroup;
} }
@@ -118,8 +127,11 @@ TEST(UnityCommandOptions, DefaultOptions)
{ {
UnityGetCommandLineOptions(1, noOptions); UnityGetCommandLineOptions(1, noOptions);
TEST_ASSERT_EQUAL(0, UnityFixture.Verbose); TEST_ASSERT_EQUAL(0, UnityFixture.Verbose);
TEST_ASSERT_EQUAL(0, UnityFixture.DryRun);
TEST_ASSERT_POINTERS_EQUAL(0, UnityFixture.GroupFilter); TEST_ASSERT_POINTERS_EQUAL(0, UnityFixture.GroupFilter);
TEST_ASSERT_POINTERS_EQUAL(0, UnityFixture.NameFilter); TEST_ASSERT_POINTERS_EQUAL(0, UnityFixture.NameFilter);
TEST_ASSERT_POINTERS_EQUAL(0, UnityFixture.Group);
TEST_ASSERT_POINTERS_EQUAL(0, UnityFixture.Name);
TEST_ASSERT_EQUAL(1, UnityFixture.RepeatCount); TEST_ASSERT_EQUAL(1, UnityFixture.RepeatCount);
} }
@@ -134,6 +146,17 @@ TEST(UnityCommandOptions, OptionVerbose)
TEST_ASSERT_EQUAL(1, UnityFixture.Verbose); TEST_ASSERT_EQUAL(1, UnityFixture.Verbose);
} }
static const char* dryRun[] = {
"testrunner.exe",
"-d"
};
TEST(UnityCommandOptions, OptionDryRun)
{
TEST_ASSERT_EQUAL(0, UnityGetCommandLineOptions(2, dryRun));
TEST_ASSERT_EQUAL(1, UnityFixture.DryRun);
}
static const char* group[] = { static const char* group[] = {
"testrunner.exe", "testrunner.exe",
"-g", "groupname" "-g", "groupname"
@@ -156,6 +179,28 @@ TEST(UnityCommandOptions, OptionSelectTestByName)
STRCMP_EQUAL("testname", UnityFixture.NameFilter); STRCMP_EQUAL("testname", UnityFixture.NameFilter);
} }
static const char* groupExact[] = {
"testrunner.exe",
"-G", "groupname"
};
TEST(UnityCommandOptions, OptionSelectTestByGroupExact)
{
TEST_ASSERT_EQUAL(0, UnityGetCommandLineOptions(3, groupExact));
STRCMP_EQUAL("groupname", UnityFixture.Group);
}
static const char* nameExact[] = {
"testrunner.exe",
"-N", "testname"
};
TEST(UnityCommandOptions, OptionSelectTestByNameExact)
{
TEST_ASSERT_EQUAL(0, UnityGetCommandLineOptions(3, nameExact));
STRCMP_EQUAL("testname", UnityFixture.Name);
}
static const char* repeat[] = { static const char* repeat[] = {
"testrunner.exe", "testrunner.exe",
"-r", "99" "-r", "99"

View File

@@ -19,8 +19,11 @@ TEST_GROUP_RUNNER(UnityCommandOptions)
{ {
RUN_TEST_CASE(UnityCommandOptions, DefaultOptions); RUN_TEST_CASE(UnityCommandOptions, DefaultOptions);
RUN_TEST_CASE(UnityCommandOptions, OptionVerbose); RUN_TEST_CASE(UnityCommandOptions, OptionVerbose);
RUN_TEST_CASE(UnityCommandOptions, OptionDryRun);
RUN_TEST_CASE(UnityCommandOptions, OptionSelectTestByGroup); RUN_TEST_CASE(UnityCommandOptions, OptionSelectTestByGroup);
RUN_TEST_CASE(UnityCommandOptions, OptionSelectTestByName); RUN_TEST_CASE(UnityCommandOptions, OptionSelectTestByName);
RUN_TEST_CASE(UnityCommandOptions, OptionSelectTestByGroupExact);
RUN_TEST_CASE(UnityCommandOptions, OptionSelectTestByNameExact);
RUN_TEST_CASE(UnityCommandOptions, OptionSelectRepeatTestsDefaultCount); RUN_TEST_CASE(UnityCommandOptions, OptionSelectRepeatTestsDefaultCount);
RUN_TEST_CASE(UnityCommandOptions, OptionSelectRepeatTestsSpecificCount); RUN_TEST_CASE(UnityCommandOptions, OptionSelectRepeatTestsSpecificCount);
RUN_TEST_CASE(UnityCommandOptions, MultipleOptions); RUN_TEST_CASE(UnityCommandOptions, MultipleOptions);

View File

@@ -26,6 +26,7 @@ project('unity', 'c',
build_fixture = get_option('extension_fixture') build_fixture = get_option('extension_fixture')
build_memory = get_option('extension_memory') build_memory = get_option('extension_memory')
support_double = get_option('support_double') support_double = get_option('support_double')
fixture_help_message = get_option('fixture_help_message')
unity_args = [] unity_args = []
unity_src = [] unity_src = []
@@ -34,14 +35,16 @@ unity_inc = []
subdir('src') subdir('src')
if build_fixture if build_fixture
# Building the fixture extension implies building the memory
# extension.
build_memory = true
subdir('extras/fixture/src') subdir('extras/fixture/src')
if fixture_help_message != ''
unity_args += '-DUNITY_CUSTOM_HELP_MSG=' + fixture_help_message
endif
endif endif
if build_memory if build_memory.enabled() or (build_memory.auto() and build_fixture)
subdir('extras/memory/src') subdir('extras/memory/src')
else
unity_args += '-DUNITY_FIXTURE_NO_EXTRAS'
endif endif
if support_double if support_double
@@ -64,10 +67,10 @@ unity_dep = declare_dependency(
if not meson.is_subproject() if not meson.is_subproject()
pkg = import('pkgconfig') pkg = import('pkgconfig')
pkg.generate( pkg.generate(
name: meson.project_name(), unity_lib,
version: meson.project_version(), version: meson.project_version(),
libraries: [ unity_lib ], subdirs: 'unity',
description: 'C Unit testing framework.' extra_cflags: unity_args,
) )
endif endif

View File

@@ -1,3 +1,4 @@
option('extension_fixture', type: 'boolean', value: 'false', description: 'Whether to enable the fixture extension.') option('extension_fixture', type: 'boolean', value: false, description: 'Whether to enable the fixture extension.')
option('extension_memory', type: 'boolean', value: 'false', description: 'Whether to enable the memory extension.') option('extension_memory', type: 'feature', value: 'auto', description: 'Whether to enable the memory extension. By default this is automatically enabled when extension_fixture is enabled.')
option('support_double', type: 'boolean', value: 'false', description: 'Whether to enable double precision floating point assertions.') option('support_double', type: 'boolean', value: false, description: 'Whether to enable double precision floating point assertions.')
option('fixture_help_message', type: 'string', description: 'If the fixture extension is enabled, this allows a custom help message to be defined.')

View File

@@ -61,14 +61,24 @@ const char UNITY_PROGMEM UnityStrErrShorthand[] = "Unity Shorth
const char UNITY_PROGMEM UnityStrErrFloat[] = "Unity Floating Point Disabled"; const char UNITY_PROGMEM UnityStrErrFloat[] = "Unity Floating Point Disabled";
const char UNITY_PROGMEM UnityStrErrDouble[] = "Unity Double Precision Disabled"; const char UNITY_PROGMEM UnityStrErrDouble[] = "Unity Double Precision Disabled";
const char UNITY_PROGMEM UnityStrErr64[] = "Unity 64-bit Support Disabled"; const char UNITY_PROGMEM UnityStrErr64[] = "Unity 64-bit Support Disabled";
const char UNITY_PROGMEM UnityStrErrDetailStack[] = "Unity Detail Stack Support Disabled";
static const char UNITY_PROGMEM UnityStrBreaker[] = "-----------------------"; static const char UNITY_PROGMEM UnityStrBreaker[] = "-----------------------";
static const char UNITY_PROGMEM UnityStrResultsTests[] = " Tests "; static const char UNITY_PROGMEM UnityStrResultsTests[] = " Tests ";
static const char UNITY_PROGMEM UnityStrResultsFailures[] = " Failures "; static const char UNITY_PROGMEM UnityStrResultsFailures[] = " Failures ";
static const char UNITY_PROGMEM UnityStrResultsIgnored[] = " Ignored "; static const char UNITY_PROGMEM UnityStrResultsIgnored[] = " Ignored ";
#ifndef UNITY_EXCLUDE_DETAILS #ifndef UNITY_EXCLUDE_DETAILS
#ifdef UNITY_DETAIL_STACK_SIZE
static const char* UNITY_PROGMEM UnityStrDetailLabels[] = UNITY_DETAIL_LABEL_NAMES;
static const UNITY_COUNTER_TYPE UNITY_PROGMEM UnityStrDetailLabelsCount = sizeof(UnityStrDetailLabels) / sizeof(const char*);
static const char UNITY_PROGMEM UnityStrErrDetailStackEmpty[] = " Detail Stack Empty";
static const char UNITY_PROGMEM UnityStrErrDetailStackFull[] = " Detail Stack Full";
static const char UNITY_PROGMEM UnityStrErrDetailStackLabel[] = " Detail Label Outside Of UNITY_DETAIL_LABEL_NAMES: ";
static const char UNITY_PROGMEM UnityStrErrDetailStackPop[] = " Detail Pop With Unexpected Arguments";
#else
static const char UNITY_PROGMEM UnityStrDetail1Name[] = UNITY_DETAIL1_NAME " "; static const char UNITY_PROGMEM UnityStrDetail1Name[] = UNITY_DETAIL1_NAME " ";
static const char UNITY_PROGMEM UnityStrDetail2Name[] = " " UNITY_DETAIL2_NAME " "; static const char UNITY_PROGMEM UnityStrDetail2Name[] = " " UNITY_DETAIL2_NAME " ";
#endif #endif
#endif
/*----------------------------------------------- /*-----------------------------------------------
* Pretty Printers & Test Result Output Handlers * Pretty Printers & Test Result Output Handlers
*-----------------------------------------------*/ *-----------------------------------------------*/
@@ -185,7 +195,7 @@ void UnityPrintLen(const char* string, const UNITY_UINT32 length)
} }
/*-----------------------------------------------*/ /*-----------------------------------------------*/
void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style) void UnityPrintIntNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style)
{ {
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
{ {
@@ -223,9 +233,13 @@ void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T
UnityPrintNumber(number); UnityPrintNumber(number);
} }
} }
else if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT) }
void UnityPrintUintNumberByStyle(const UNITY_UINT number, const UNITY_DISPLAY_STYLE_T style)
{
if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT)
{ {
UnityPrintNumberUnsigned((UNITY_UINT)number); UnityPrintNumberUnsigned(number);
} }
else else
{ {
@@ -574,6 +588,32 @@ static void UnityAddMsgIfSpecified(const char* msg)
UNITY_PRINT_TEST_CONTEXT(); UNITY_PRINT_TEST_CONTEXT();
#endif #endif
#ifndef UNITY_EXCLUDE_DETAILS #ifndef UNITY_EXCLUDE_DETAILS
#ifdef UNITY_DETAIL_STACK_SIZE
{
UNITY_COUNTER_TYPE c;
for (c = 0; (c < Unity.CurrentDetailStackSize) && (c < UNITY_DETAIL_STACK_SIZE); c++) {
const char* label;
if ((Unity.CurrentDetailStackLabels[c] == UNITY_DETAIL_NONE) || (Unity.CurrentDetailStackLabels[c] > UnityStrDetailLabelsCount)) {
break;
}
label = UnityStrDetailLabels[Unity.CurrentDetailStackLabels[c]];
UnityPrint(UnityStrSpacer);
if ((label[0] == '#') && (label[1] != 0)) {
UnityPrint(label + 2);
UNITY_OUTPUT_CHAR(' ');
if ((label[1] & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) {
UnityPrintIntNumberByStyle((UNITY_INT)Unity.CurrentDetailStackValues[c], label[1]);
} else {
UnityPrintUintNumberByStyle((UNITY_UINT)Unity.CurrentDetailStackValues[c], label[1]);
}
} else if (Unity.CurrentDetailStackValues[c] != 0){
UnityPrint(label);
UNITY_OUTPUT_CHAR(' ');
UnityPrint((const char*)Unity.CurrentDetailStackValues[c]);
}
}
}
#else
if (Unity.CurrentDetail1) if (Unity.CurrentDetail1)
{ {
UnityPrint(UnityStrSpacer); UnityPrint(UnityStrSpacer);
@@ -585,6 +625,7 @@ static void UnityAddMsgIfSpecified(const char* msg)
UnityPrint(Unity.CurrentDetail2); UnityPrint(Unity.CurrentDetail2);
} }
} }
#endif
#endif #endif
if (msg) if (msg)
{ {
@@ -709,11 +750,11 @@ void UnityAssertBits(const UNITY_INT mask,
} }
/*-----------------------------------------------*/ /*-----------------------------------------------*/
void UnityAssertEqualNumber(const UNITY_INT expected, void UnityAssertEqualIntNumber(const UNITY_INT expected,
const UNITY_INT actual, const UNITY_INT actual,
const char* msg, const char* msg,
const UNITY_LINE_TYPE lineNumber, const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style) const UNITY_DISPLAY_STYLE_T style)
{ {
RETURN_IF_FAIL_OR_IGNORE; RETURN_IF_FAIL_OR_IGNORE;
@@ -721,49 +762,90 @@ void UnityAssertEqualNumber(const UNITY_INT expected,
{ {
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrExpected); UnityPrint(UnityStrExpected);
UnityPrintNumberByStyle(expected, style); UnityPrintIntNumberByStyle(expected, style);
UnityPrint(UnityStrWas); UnityPrint(UnityStrWas);
UnityPrintNumberByStyle(actual, style); UnityPrintIntNumberByStyle(actual, style);
UnityAddMsgIfSpecified(msg); UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
} }
void UnityAssertEqualUintNumber(const UNITY_UINT expected,
const UNITY_UINT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style)
{
RETURN_IF_FAIL_OR_IGNORE;
if (expected != actual)
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrExpected);
UnityPrintUintNumberByStyle(expected, style);
UnityPrint(UnityStrWas);
UnityPrintUintNumberByStyle(actual, style);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
}
/*-----------------------------------------------*/ /*-----------------------------------------------*/
void UnityAssertGreaterOrLessOrEqualNumber(const UNITY_INT threshold, void UnityAssertIntGreaterOrLessOrEqualNumber(const UNITY_INT threshold,
const UNITY_INT actual, const UNITY_INT actual,
const UNITY_COMPARISON_T compare, const UNITY_COMPARISON_T compare,
const char *msg, const char *msg,
const UNITY_LINE_TYPE lineNumber, const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style) const UNITY_DISPLAY_STYLE_T style)
{ {
int failed = 0; int failed = 0;
RETURN_IF_FAIL_OR_IGNORE; RETURN_IF_FAIL_OR_IGNORE;
if ((threshold == actual) && (compare & UNITY_EQUAL_TO)) { return; } if ((threshold == actual) && !(compare & UNITY_EQUAL_TO)) { failed = 1; }
if ((threshold == actual)) { failed = 1; }
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) if ((actual > threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
{ if ((actual < threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
if ((actual > threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
if ((actual < threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
}
else /* UINT or HEX */
{
if (((UNITY_UINT)actual > (UNITY_UINT)threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
if (((UNITY_UINT)actual < (UNITY_UINT)threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
}
if (failed) if (failed)
{ {
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrExpected); UnityPrint(UnityStrExpected);
UnityPrintNumberByStyle(actual, style); UnityPrintIntNumberByStyle(actual, style);
if (compare & UNITY_GREATER_THAN) { UnityPrint(UnityStrGt); } if (compare & UNITY_GREATER_THAN) { UnityPrint(UnityStrGt); }
if (compare & UNITY_SMALLER_THAN) { UnityPrint(UnityStrLt); } if (compare & UNITY_SMALLER_THAN) { UnityPrint(UnityStrLt); }
if (compare & UNITY_EQUAL_TO) { UnityPrint(UnityStrOrEqual); } if (compare & UNITY_EQUAL_TO) { UnityPrint(UnityStrOrEqual); }
if (compare == UNITY_NOT_EQUAL) { UnityPrint(UnityStrNotEqual); } if (compare == UNITY_NOT_EQUAL) { UnityPrint(UnityStrNotEqual); }
UnityPrintNumberByStyle(threshold, style); UnityPrintIntNumberByStyle(threshold, style);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
}
void UnityAssertUintGreaterOrLessOrEqualNumber(const UNITY_UINT threshold,
const UNITY_UINT actual,
const UNITY_COMPARISON_T compare,
const char *msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style)
{
int failed = 0;
RETURN_IF_FAIL_OR_IGNORE;
if ((threshold == actual) && !(compare & UNITY_EQUAL_TO)) { failed = 1; }
/* UINT or HEX */
if ((actual > threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
if ((actual < threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
if (failed)
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrExpected);
UnityPrintUintNumberByStyle(actual, style);
if (compare & UNITY_GREATER_THAN) { UnityPrint(UnityStrGt); }
if (compare & UNITY_SMALLER_THAN) { UnityPrint(UnityStrLt); }
if (compare & UNITY_EQUAL_TO) { UnityPrint(UnityStrOrEqual); }
if (compare == UNITY_NOT_EQUAL) { UnityPrint(UnityStrNotEqual); }
UnityPrintUintNumberByStyle(threshold, style);
UnityAddMsgIfSpecified(msg); UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
@@ -877,9 +959,9 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
UnityPrint(UnityStrElement); UnityPrint(UnityStrElement);
UnityPrintNumberUnsigned(num_elements - elements - 1); UnityPrintNumberUnsigned(num_elements - elements - 1);
UnityPrint(UnityStrExpected); UnityPrint(UnityStrExpected);
UnityPrintNumberByStyle(expect_val, style); UnityPrintIntNumberByStyle(expect_val, style);
UnityPrint(UnityStrWas); UnityPrint(UnityStrWas);
UnityPrintNumberByStyle(actual_val, style); UnityPrintIntNumberByStyle(actual_val, style);
UnityAddMsgIfSpecified(msg); UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
@@ -1028,6 +1110,7 @@ void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
} }
} }
#ifndef UNITY_EXCLUDE_FLOAT_PRINT
/*-----------------------------------------------*/ /*-----------------------------------------------*/
void UnityAssertFloatsNotWithin(const UNITY_FLOAT delta, void UnityAssertFloatsNotWithin(const UNITY_FLOAT delta,
const UNITY_FLOAT expected, const UNITY_FLOAT expected,
@@ -1081,6 +1164,7 @@ void UnityAssertGreaterOrLessFloat(const UNITY_FLOAT threshold,
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
} }
#endif /* ! UNITY_EXCLUDE_FLOAT_PRINT */
/*-----------------------------------------------*/ /*-----------------------------------------------*/
void UnityAssertFloatSpecial(const UNITY_FLOAT actual, void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
@@ -1255,6 +1339,7 @@ void UnityAssertDoublesWithin(const UNITY_DOUBLE delta,
} }
} }
#ifndef UNITY_EXCLUDE_FLOAT_PRINT
/*-----------------------------------------------*/ /*-----------------------------------------------*/
void UnityAssertDoublesNotWithin(const UNITY_DOUBLE delta, void UnityAssertDoublesNotWithin(const UNITY_DOUBLE delta,
const UNITY_DOUBLE expected, const UNITY_DOUBLE expected,
@@ -1308,6 +1393,7 @@ void UnityAssertGreaterOrLessDouble(const UNITY_DOUBLE threshold,
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
} }
#endif /* ! UNITY_EXCLUDE_FLOAT_PRINT */
/*-----------------------------------------------*/ /*-----------------------------------------------*/
void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual, void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
@@ -1377,47 +1463,65 @@ void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
#endif /* not UNITY_EXCLUDE_DOUBLE */ #endif /* not UNITY_EXCLUDE_DOUBLE */
/*-----------------------------------------------*/ /*-----------------------------------------------*/
void UnityAssertNumbersWithin(const UNITY_UINT delta, void UnityAssertIntNumbersWithin(const UNITY_UINT delta,
const UNITY_INT expected, const UNITY_INT expected,
const UNITY_INT actual, const UNITY_INT actual,
const char* msg, const char* msg,
const UNITY_LINE_TYPE lineNumber, const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style) const UNITY_DISPLAY_STYLE_T style)
{ {
RETURN_IF_FAIL_OR_IGNORE; RETURN_IF_FAIL_OR_IGNORE;
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) if (actual > expected)
{ {
if (actual > expected) Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
{
Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
}
else
{
Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
}
} }
else else
{ {
if ((UNITY_UINT)actual > (UNITY_UINT)expected) Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
{
Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
}
else
{
Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
}
} }
if (Unity.CurrentTestFailed) if (Unity.CurrentTestFailed)
{ {
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrDelta); UnityPrint(UnityStrDelta);
UnityPrintNumberByStyle((UNITY_INT)delta, style); UnityPrintIntNumberByStyle((UNITY_INT)delta, style);
UnityPrint(UnityStrExpected); UnityPrint(UnityStrExpected);
UnityPrintNumberByStyle(expected, style); UnityPrintIntNumberByStyle(expected, style);
UnityPrint(UnityStrWas); UnityPrint(UnityStrWas);
UnityPrintNumberByStyle(actual, style); UnityPrintIntNumberByStyle(actual, style);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
}
void UnityAssertUintNumbersWithin(const UNITY_UINT delta,
const UNITY_UINT expected,
const UNITY_UINT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style)
{
RETURN_IF_FAIL_OR_IGNORE;
if (actual > expected)
{
Unity.CurrentTestFailed = ((actual - expected) > delta);
}
else
{
Unity.CurrentTestFailed = ((expected - actual) > delta);
}
if (Unity.CurrentTestFailed)
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrDelta);
UnityPrintUintNumberByStyle(delta, style);
UnityPrint(UnityStrExpected);
UnityPrintUintNumberByStyle(expected, style);
UnityPrint(UnityStrWas);
UnityPrintUintNumberByStyle(actual, style);
UnityAddMsgIfSpecified(msg); UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
@@ -1568,13 +1672,13 @@ void UnityAssertNumbersArrayWithin(const UNITY_UINT delta,
} }
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrDelta); UnityPrint(UnityStrDelta);
UnityPrintNumberByStyle((UNITY_INT)delta, style); UnityPrintIntNumberByStyle((UNITY_INT)delta, style);
UnityPrint(UnityStrElement); UnityPrint(UnityStrElement);
UnityPrintNumberUnsigned(num_elements - elements - 1); UnityPrintNumberUnsigned(num_elements - elements - 1);
UnityPrint(UnityStrExpected); UnityPrint(UnityStrExpected);
UnityPrintNumberByStyle(expect_val, style); UnityPrintIntNumberByStyle(expect_val, style);
UnityPrint(UnityStrWas); UnityPrint(UnityStrWas);
UnityPrintNumberByStyle(actual_val, style); UnityPrintIntNumberByStyle(actual_val, style);
UnityAddMsgIfSpecified(msg); UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
@@ -1805,9 +1909,9 @@ void UnityAssertEqualMemory(UNITY_INTERNAL_PTR expected,
UnityPrint(UnityStrByte); UnityPrint(UnityStrByte);
UnityPrintNumberUnsigned(length - bytes - 1); UnityPrintNumberUnsigned(length - bytes - 1);
UnityPrint(UnityStrExpected); UnityPrint(UnityStrExpected);
UnityPrintNumberByStyle(*ptr_exp, UNITY_DISPLAY_STYLE_HEX8); UnityPrintIntNumberByStyle(*ptr_exp, UNITY_DISPLAY_STYLE_HEX8);
UnityPrint(UnityStrWas); UnityPrint(UnityStrWas);
UnityPrintNumberByStyle(*ptr_act, UNITY_DISPLAY_STYLE_HEX8); UnityPrintIntNumberByStyle(*ptr_act, UNITY_DISPLAY_STYLE_HEX8);
UnityAddMsgIfSpecified(msg); UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
@@ -1937,7 +2041,7 @@ static enum UnityLengthModifier UnityLengthModifierGet(const char *pch, int *len
} }
case 'h': case 'h':
{ {
// short and char are converted to int /* short and char are converted to int */
length_mod = UNITY_LENGTH_MODIFIER_NONE; length_mod = UNITY_LENGTH_MODIFIER_NONE;
if (pch[1] == 'h') if (pch[1] == 'h')
{ {
@@ -1954,7 +2058,7 @@ static enum UnityLengthModifier UnityLengthModifierGet(const char *pch, int *len
case 't': case 't':
case 'L': case 'L':
{ {
// Not supported, but should gobble up the length specifier anyway /* Not supported, but should gobble up the length specifier anyway */
length_mod = UNITY_LENGTH_MODIFIER_NONE; length_mod = UNITY_LENGTH_MODIFIER_NONE;
*length = 1; *length = 1;
break; break;
@@ -2127,32 +2231,7 @@ void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
UnityTestResultsBegin(Unity.TestFile, line); UnityTestResultsBegin(Unity.TestFile, line);
UnityPrint(UnityStrFail); UnityPrint(UnityStrFail);
if (msg != NULL) UnityAddMsgIfSpecified(msg);
{
UNITY_OUTPUT_CHAR(':');
#ifdef UNITY_PRINT_TEST_CONTEXT
UNITY_PRINT_TEST_CONTEXT();
#endif
#ifndef UNITY_EXCLUDE_DETAILS
if (Unity.CurrentDetail1)
{
UnityPrint(UnityStrDetail1Name);
UnityPrint(Unity.CurrentDetail1);
if (Unity.CurrentDetail2)
{
UnityPrint(UnityStrDetail2Name);
UnityPrint(Unity.CurrentDetail2);
}
UnityPrint(UnityStrSpacer);
}
#endif
if (msg[0] != ' ')
{
UNITY_OUTPUT_CHAR(' ');
}
UnityPrint(msg);
}
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
@@ -2195,7 +2274,13 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
Unity.CurrentTestName = FuncName; Unity.CurrentTestName = FuncName;
Unity.CurrentTestLineNumber = (UNITY_LINE_TYPE)FuncLineNum; Unity.CurrentTestLineNumber = (UNITY_LINE_TYPE)FuncLineNum;
Unity.NumberOfTests++; Unity.NumberOfTests++;
#ifndef UNITY_EXCLUDE_DETAILS
#ifdef UNITY_DETAIL_STACK_SIZE
Unity.CurrentDetailStackSize = 0;
#else
UNITY_CLR_DETAILS(); UNITY_CLR_DETAILS();
#endif
#endif
UNITY_EXEC_TIME_START(); UNITY_EXEC_TIME_START();
if (TEST_PROTECT()) if (TEST_PROTECT())
{ {
@@ -2263,6 +2348,46 @@ int UnityEnd(void)
return (int)(Unity.TestFailures); return (int)(Unity.TestFailures);
} }
/*-----------------------------------------------
* Details Stack
*-----------------------------------------------*/
#ifndef UNITY_EXCLUDE_DETAILS
#ifdef UNITY_DETAIL_STACK_SIZE
void UnityPushDetail(UNITY_DETAIL_LABEL_TYPE label, UNITY_DETAIL_VALUE_TYPE value, const UNITY_LINE_TYPE line) {
if (Unity.CurrentDetailStackSize >= UNITY_DETAIL_STACK_SIZE) {
UnityTestResultsFailBegin(line);
UnityPrint(UnityStrErrDetailStackFull);
UnityAddMsgIfSpecified(NULL);
UNITY_FAIL_AND_BAIL;
}
if (label >= UnityStrDetailLabelsCount) {
UnityTestResultsFailBegin(line);
UnityPrint(UnityStrErrDetailStackLabel);
UnityPrintNumberUnsigned(label);
UnityAddMsgIfSpecified(NULL);
UNITY_FAIL_AND_BAIL;
}
Unity.CurrentDetailStackLabels[Unity.CurrentDetailStackSize] = label;
Unity.CurrentDetailStackValues[Unity.CurrentDetailStackSize++] = value;
}
void UnityPopDetail(UNITY_DETAIL_LABEL_TYPE label, UNITY_DETAIL_VALUE_TYPE value, const UNITY_LINE_TYPE line) {
if (Unity.CurrentDetailStackSize == 0) {
UnityTestResultsFailBegin(line);
UnityPrint(UnityStrErrDetailStackEmpty);
UnityAddMsgIfSpecified(NULL);
UNITY_FAIL_AND_BAIL;
}
if ((Unity.CurrentDetailStackLabels[Unity.CurrentDetailStackSize-1] != label) || (Unity.CurrentDetailStackValues[Unity.CurrentDetailStackSize-1] != value)) {
UnityTestResultsFailBegin(line);
UnityPrint(UnityStrErrDetailStackPop);
UnityAddMsgIfSpecified(NULL);
UNITY_FAIL_AND_BAIL;
}
Unity.CurrentDetailStackSize--;
}
#endif
#endif
/*----------------------------------------------- /*-----------------------------------------------
* Command Line Argument Support * Command Line Argument Support
*-----------------------------------------------*/ *-----------------------------------------------*/
@@ -2394,7 +2519,7 @@ static int IsStringInBiggerString(const char* longstring, const char* shortstrin
} }
} }
// If we didn't match and we're on strict matching, we already know we failed /* If we didn't match and we're on strict matching, we already know we failed */
if (UnityStrictMatch) if (UnityStrictMatch)
{ {
return 0; return 0;

View File

@@ -11,7 +11,7 @@
#define UNITY_VERSION_MAJOR 2 #define UNITY_VERSION_MAJOR 2
#define UNITY_VERSION_MINOR 6 #define UNITY_VERSION_MINOR 6
#define UNITY_VERSION_BUILD 1 #define UNITY_VERSION_BUILD 2
#define UNITY_VERSION ((UNITY_VERSION_MAJOR << 16) | (UNITY_VERSION_MINOR << 8) | UNITY_VERSION_BUILD) #define UNITY_VERSION ((UNITY_VERSION_MAJOR << 16) | (UNITY_VERSION_MINOR << 8) | UNITY_VERSION_BUILD)
#ifdef __cplusplus #ifdef __cplusplus
@@ -45,7 +45,7 @@ int suiteTearDown(int num_failures);
* Test Reset and Verify * Test Reset and Verify
*-------------------------------------------------------*/ *-------------------------------------------------------*/
/* These functions are intended to be called before during tests in order /* These functions are intended to be called before or during tests in order
* to support complex test loops, etc. Both are NOT built into Unity. Instead * to support complex test loops, etc. Both are NOT built into Unity. Instead
* the test runner generator will create them. resetTest will run teardown and * the test runner generator will create them. resetTest will run teardown and
* setup again, verifying any end-of-test needs between. verifyTest will only * setup again, verifying any end-of-test needs between. verifyTest will only

View File

@@ -87,6 +87,13 @@
/* Since C23, the keyword _Noreturn has been replaced by the attribute noreturn, based on: */ /* Since C23, the keyword _Noreturn has been replaced by the attribute noreturn, based on: */
/* https://en.cppreference.com/w/c/language/attributes/noreturn */ /* https://en.cppreference.com/w/c/language/attributes/noreturn */
#define UNITY_NORETURN [[ noreturn ]] #define UNITY_NORETURN [[ noreturn ]]
#elif defined(__IAR_SYSTEMS_ICC__) && (__IAR_SYSTEMS_ICC__ >= 8)
/* For IAR compilers supporting at least C99 use the IAR specific '__noreturn' keyword */
/* Based on tests and: */
/* https://wwwfiles.iar.com/arm/webic/doc/EWARM_DevelopmentGuide.ENU.pdf */
/* https://wwwfiles.iar.com/AVR/webic/doc/EWAVR_CompilerGuide.pdf */
/* https://wwwfiles.iar.com/msp430/webic/doc/EW430_CompilerReference.pdf */
#define UNITY_NORETURN __noreturn
#endif #endif
#endif #endif
#ifndef UNITY_NORETURN #ifndef UNITY_NORETURN
@@ -480,14 +487,12 @@ typedef enum
typedef enum typedef enum
{ {
UNITY_WITHIN = 0x0,
UNITY_EQUAL_TO = 0x1, UNITY_EQUAL_TO = 0x1,
UNITY_GREATER_THAN = 0x2, UNITY_GREATER_THAN = 0x2,
UNITY_GREATER_OR_EQUAL = 0x2 + UNITY_EQUAL_TO, UNITY_GREATER_OR_EQUAL = 0x2 + UNITY_EQUAL_TO,
UNITY_SMALLER_THAN = 0x4, UNITY_SMALLER_THAN = 0x4,
UNITY_SMALLER_OR_EQUAL = 0x4 + UNITY_EQUAL_TO, UNITY_SMALLER_OR_EQUAL = 0x4 + UNITY_EQUAL_TO,
UNITY_NOT_EQUAL = 0x0, UNITY_NOT_EQUAL = 0x8
UNITY_UNKNOWN
} UNITY_COMPARISON_T; } UNITY_COMPARISON_T;
#ifndef UNITY_EXCLUDE_FLOAT #ifndef UNITY_EXCLUDE_FLOAT
@@ -512,13 +517,30 @@ typedef enum
UNITY_ARRAY_UNKNOWN UNITY_ARRAY_UNKNOWN
} UNITY_FLAGS_T; } UNITY_FLAGS_T;
#ifndef UNITY_EXCLUDE_DETAILS
#ifdef UNITY_DETAIL_STACK_SIZE
#ifndef UNITY_DETAIL_LABEL_TYPE
#define UNITY_DETAIL_LABEL_TYPE uint8_t
#endif
#ifndef UNITY_DETAIL_VALUE_TYPE
#define UNITY_DETAIL_VALUE_TYPE UNITY_PTR_TO_INT
#endif
#endif
#endif
struct UNITY_STORAGE_T struct UNITY_STORAGE_T
{ {
const char* TestFile; const char* TestFile;
const char* CurrentTestName; const char* CurrentTestName;
#ifndef UNITY_EXCLUDE_DETAILS #ifndef UNITY_EXCLUDE_DETAILS
#ifdef UNITY_DETAIL_STACK_SIZE
UNITY_DETAIL_LABEL_TYPE CurrentDetailStackLabels[UNITY_DETAIL_STACK_SIZE];
UNITY_DETAIL_VALUE_TYPE CurrentDetailStackValues[UNITY_DETAIL_STACK_SIZE];
UNITY_COUNTER_TYPE CurrentDetailStackSize;
#else
const char* CurrentDetail1; const char* CurrentDetail1;
const char* CurrentDetail2; const char* CurrentDetail2;
#endif
#endif #endif
UNITY_LINE_TYPE CurrentTestLineNumber; UNITY_LINE_TYPE CurrentTestLineNumber;
UNITY_COUNTER_TYPE NumberOfTests; UNITY_COUNTER_TYPE NumberOfTests;
@@ -561,10 +583,6 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
#define UNITY_SET_DETAIL(d1) #define UNITY_SET_DETAIL(d1)
#define UNITY_SET_DETAILS(d1,d2) #define UNITY_SET_DETAILS(d1,d2)
#else #else
#define UNITY_CLR_DETAILS() do { Unity.CurrentDetail1 = 0; Unity.CurrentDetail2 = 0; } while (0)
#define UNITY_SET_DETAIL(d1) do { Unity.CurrentDetail1 = (d1); Unity.CurrentDetail2 = 0; } while (0)
#define UNITY_SET_DETAILS(d1,d2) do { Unity.CurrentDetail1 = (d1); Unity.CurrentDetail2 = (d2); } while (0)
#ifndef UNITY_DETAIL1_NAME #ifndef UNITY_DETAIL1_NAME
#define UNITY_DETAIL1_NAME "Function" #define UNITY_DETAIL1_NAME "Function"
#endif #endif
@@ -572,6 +590,47 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
#ifndef UNITY_DETAIL2_NAME #ifndef UNITY_DETAIL2_NAME
#define UNITY_DETAIL2_NAME "Argument" #define UNITY_DETAIL2_NAME "Argument"
#endif #endif
#ifdef UNITY_DETAIL_STACK_SIZE
/* stack based implementation */
#ifndef UNITY_DETAIL_LABEL_NAMES
/* Note: If the label name string starts with '#', the second byte is interpreted as UNITY_DISPLAY_STYLE_T,
* and the detail value will be printed as number (e.g. "#\x24Line" to output "Line <UINT32 value>").
* Otherwise, the detail value must be a pointer to a string that is valid until it is pop'ed.
*/
#define UNITY_DETAIL_LABEL_NAMES {0, UNITY_DETAIL1_NAME, UNITY_DETAIL2_NAME}
typedef enum
{
UNITY_DETAIL_NONE = 0,
UNITY_DETAIL_D1 = 1,
UNITY_DETAIL_D2 = 2
} UNITY_DETAIL_LABEL_T;
#endif
void UnityPushDetail(UNITY_DETAIL_LABEL_TYPE label, UNITY_DETAIL_VALUE_TYPE value, const UNITY_LINE_TYPE line);
void UnityPopDetail(UNITY_DETAIL_LABEL_TYPE label, UNITY_DETAIL_VALUE_TYPE value, const UNITY_LINE_TYPE line);
#define UNITY_CLR_DETAILS() do { \
if(Unity.CurrentDetailStackSize && \
Unity.CurrentDetailStackLabels[Unity.CurrentDetailStackSize - 1] == UNITY_DETAIL_D2) { \
Unity.CurrentDetailStackLabels[--Unity.CurrentDetailStackSize] = UNITY_DETAIL_NONE;} \
if(Unity.CurrentDetailStackSize && \
Unity.CurrentDetailStackLabels[Unity.CurrentDetailStackSize - 1] == UNITY_DETAIL_D1) { \
Unity.CurrentDetailStackLabels[--Unity.CurrentDetailStackSize] = UNITY_DETAIL_NONE;} \
} while (0)
#define UNITY_SET_DETAIL(d1) do { UNITY_CLR_DETAILS(); \
UnityPushDetail(UNITY_DETAIL_D1, (UNITY_DETAIL_VALUE_TYPE)(d1), __LINE__); \
} while (0)
#define UNITY_SET_DETAILS(d1,d2) do { UNITY_CLR_DETAILS(); \
UnityPushDetail(UNITY_DETAIL_D1, (UNITY_DETAIL_VALUE_TYPE)(d1), __LINE__); \
UnityPushDetail(UNITY_DETAIL_D2, (UNITY_DETAIL_VALUE_TYPE)(d2), __LINE__); \
} while (0)
#else
/* just two hardcoded slots */
#define UNITY_CLR_DETAILS() do { Unity.CurrentDetail1 = 0; Unity.CurrentDetail2 = 0; } while (0)
#define UNITY_SET_DETAIL(d1) do { Unity.CurrentDetail1 = (d1); Unity.CurrentDetail2 = 0; } while (0)
#define UNITY_SET_DETAILS(d1,d2) do { Unity.CurrentDetail1 = (d1); Unity.CurrentDetail2 = (d2); } while (0)
#endif
#endif #endif
#ifdef UNITY_PRINT_TEST_CONTEXT #ifdef UNITY_PRINT_TEST_CONTEXT
@@ -590,7 +649,8 @@ void UnityPrintF(const UNITY_LINE_TYPE line, const char* format, ...);
void UnityPrintLen(const char* string, const UNITY_UINT32 length); void UnityPrintLen(const char* string, const UNITY_UINT32 length);
void UnityPrintMask(const UNITY_UINT mask, const UNITY_UINT number); void UnityPrintMask(const UNITY_UINT mask, const UNITY_UINT number);
void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style); void UnityPrintIntNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style);
void UnityPrintUintNumberByStyle(const UNITY_UINT number, const UNITY_DISPLAY_STYLE_T style);
void UnityPrintNumber(const UNITY_INT number_to_print); void UnityPrintNumber(const UNITY_INT number_to_print);
void UnityPrintNumberUnsigned(const UNITY_UINT number); void UnityPrintNumberUnsigned(const UNITY_UINT number);
void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print); void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print);
@@ -607,18 +667,31 @@ void UnityPrintFloat(const UNITY_DOUBLE input_number);
* convention and will pull in file and line information * convention and will pull in file and line information
* for you. */ * for you. */
void UnityAssertEqualNumber(const UNITY_INT expected, void UnityAssertEqualIntNumber(const UNITY_INT expected,
const UNITY_INT actual, const UNITY_INT actual,
const char* msg, const char* msg,
const UNITY_LINE_TYPE lineNumber, const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style); const UNITY_DISPLAY_STYLE_T style);
void UnityAssertGreaterOrLessOrEqualNumber(const UNITY_INT threshold, void UnityAssertEqualUintNumber(const UNITY_UINT expected,
const UNITY_INT actual, const UNITY_UINT actual,
const UNITY_COMPARISON_T compare, const char* msg,
const char *msg, const UNITY_LINE_TYPE lineNumber,
const UNITY_LINE_TYPE lineNumber, const UNITY_DISPLAY_STYLE_T style);
const UNITY_DISPLAY_STYLE_T style);
void UnityAssertIntGreaterOrLessOrEqualNumber(const UNITY_INT threshold,
const UNITY_INT actual,
const UNITY_COMPARISON_T compare,
const char *msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style);
void UnityAssertUintGreaterOrLessOrEqualNumber(const UNITY_UINT threshold,
const UNITY_UINT actual,
const UNITY_COMPARISON_T compare,
const char *msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style);
void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected, void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
UNITY_INTERNAL_PTR actual, UNITY_INTERNAL_PTR actual,
@@ -660,12 +733,19 @@ void UnityAssertEqualMemory( UNITY_INTERNAL_PTR expected,
const UNITY_LINE_TYPE lineNumber, const UNITY_LINE_TYPE lineNumber,
const UNITY_FLAGS_T flags); const UNITY_FLAGS_T flags);
void UnityAssertNumbersWithin(const UNITY_UINT delta, void UnityAssertIntNumbersWithin(const UNITY_UINT delta,
const UNITY_INT expected, const UNITY_INT expected,
const UNITY_INT actual, const UNITY_INT actual,
const char* msg, const char* msg,
const UNITY_LINE_TYPE lineNumber, const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style); const UNITY_DISPLAY_STYLE_T style);
void UnityAssertUintNumbersWithin(const UNITY_UINT delta,
const UNITY_UINT expected,
const UNITY_UINT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style);
void UnityAssertNumbersArrayWithin(const UNITY_UINT delta, void UnityAssertNumbersArrayWithin(const UNITY_UINT delta,
UNITY_INTERNAL_PTR expected, UNITY_INTERNAL_PTR expected,
@@ -894,97 +974,97 @@ int UnityTestMatches(void);
#define UNITY_TEST_ASSERT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) == 0), (line), (message)) #define UNITY_TEST_ASSERT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) == 0), (line), (message))
#define UNITY_TEST_ASSERT_NOT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) != 0), (line), (message)) #define UNITY_TEST_ASSERT_NOT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) != 0), (line), (message))
#define UNITY_TEST_ASSERT_EQUAL_INT(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT) #define UNITY_TEST_ASSERT_EQUAL_INT(expected, actual, line, message) UnityAssertEqualIntNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
#define UNITY_TEST_ASSERT_EQUAL_INT8(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(expected), (UNITY_INT)(UNITY_INT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8) #define UNITY_TEST_ASSERT_EQUAL_INT8(expected, actual, line, message) UnityAssertEqualIntNumber((UNITY_INT)(UNITY_INT8 )(expected), (UNITY_INT)(UNITY_INT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
#define UNITY_TEST_ASSERT_EQUAL_INT16(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT16)(expected), (UNITY_INT)(UNITY_INT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16) #define UNITY_TEST_ASSERT_EQUAL_INT16(expected, actual, line, message) UnityAssertEqualIntNumber((UNITY_INT)(UNITY_INT16)(expected), (UNITY_INT)(UNITY_INT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
#define UNITY_TEST_ASSERT_EQUAL_INT32(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT32)(expected), (UNITY_INT)(UNITY_INT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32) #define UNITY_TEST_ASSERT_EQUAL_INT32(expected, actual, line, message) UnityAssertEqualIntNumber((UNITY_INT)(UNITY_INT32)(expected), (UNITY_INT)(UNITY_INT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
#define UNITY_TEST_ASSERT_EQUAL_UINT(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT) #define UNITY_TEST_ASSERT_EQUAL_UINT(expected, actual, line, message) UnityAssertEqualUintNumber((UNITY_UINT)(expected), (UNITY_UINT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
#define UNITY_TEST_ASSERT_EQUAL_UINT8(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_UINT8 )(expected), (UNITY_INT)(UNITY_UINT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8) #define UNITY_TEST_ASSERT_EQUAL_UINT8(expected, actual, line, message) UnityAssertEqualUintNumber((UNITY_UINT)(UNITY_UINT8)(expected), (UNITY_UINT)(UNITY_UINT8)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
#define UNITY_TEST_ASSERT_EQUAL_UINT16(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_UINT16)(expected), (UNITY_INT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16) #define UNITY_TEST_ASSERT_EQUAL_UINT16(expected, actual, line, message) UnityAssertEqualUintNumber((UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
#define UNITY_TEST_ASSERT_EQUAL_UINT32(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_UINT32)(expected), (UNITY_INT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32) #define UNITY_TEST_ASSERT_EQUAL_UINT32(expected, actual, line, message) UnityAssertEqualUintNumber((UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
#define UNITY_TEST_ASSERT_EQUAL_HEX8(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(expected), (UNITY_INT)(UNITY_INT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8) #define UNITY_TEST_ASSERT_EQUAL_HEX8(expected, actual, line, message) UnityAssertEqualUintNumber((UNITY_UINT)(UNITY_UINT8)(expected), (UNITY_UINT)(UNITY_UINT8)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
#define UNITY_TEST_ASSERT_EQUAL_HEX16(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT16)(expected), (UNITY_INT)(UNITY_INT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16) #define UNITY_TEST_ASSERT_EQUAL_HEX16(expected, actual, line, message) UnityAssertEqualUintNumber((UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
#define UNITY_TEST_ASSERT_EQUAL_HEX32(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT32)(expected), (UNITY_INT)(UNITY_INT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32) #define UNITY_TEST_ASSERT_EQUAL_HEX32(expected, actual, line, message) UnityAssertEqualUintNumber((UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
#define UNITY_TEST_ASSERT_EQUAL_CHAR(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(expected), (UNITY_INT)(UNITY_INT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR) #define UNITY_TEST_ASSERT_EQUAL_CHAR(expected, actual, line, message) UnityAssertEqualIntNumber((UNITY_INT)(UNITY_INT8 )(expected), (UNITY_INT)(UNITY_INT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
#define UNITY_TEST_ASSERT_BITS(mask, expected, actual, line, message) UnityAssertBits((UNITY_INT)(mask), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line)) #define UNITY_TEST_ASSERT_BITS(mask, expected, actual, line, message) UnityAssertBits((UNITY_INT)(mask), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line))
#define UNITY_TEST_ASSERT_NOT_EQUAL_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT) #define UNITY_TEST_ASSERT_NOT_EQUAL_INT(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
#define UNITY_TEST_ASSERT_NOT_EQUAL_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8) #define UNITY_TEST_ASSERT_NOT_EQUAL_INT8(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
#define UNITY_TEST_ASSERT_NOT_EQUAL_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16) #define UNITY_TEST_ASSERT_NOT_EQUAL_INT16(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
#define UNITY_TEST_ASSERT_NOT_EQUAL_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32) #define UNITY_TEST_ASSERT_NOT_EQUAL_INT32(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT) #define UNITY_TEST_ASSERT_NOT_EQUAL_UINT(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8) #define UNITY_TEST_ASSERT_NOT_EQUAL_UINT8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16) #define UNITY_TEST_ASSERT_NOT_EQUAL_UINT16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32) #define UNITY_TEST_ASSERT_NOT_EQUAL_UINT32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8) #define UNITY_TEST_ASSERT_NOT_EQUAL_HEX8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16) #define UNITY_TEST_ASSERT_NOT_EQUAL_HEX16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32) #define UNITY_TEST_ASSERT_NOT_EQUAL_HEX32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
#define UNITY_TEST_ASSERT_NOT_EQUAL_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR) #define UNITY_TEST_ASSERT_NOT_EQUAL_CHAR(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
#define UNITY_TEST_ASSERT_GREATER_THAN_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT) #define UNITY_TEST_ASSERT_GREATER_THAN_INT(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
#define UNITY_TEST_ASSERT_GREATER_THAN_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8) #define UNITY_TEST_ASSERT_GREATER_THAN_INT8(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
#define UNITY_TEST_ASSERT_GREATER_THAN_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16) #define UNITY_TEST_ASSERT_GREATER_THAN_INT16(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
#define UNITY_TEST_ASSERT_GREATER_THAN_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32) #define UNITY_TEST_ASSERT_GREATER_THAN_INT32(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
#define UNITY_TEST_ASSERT_GREATER_THAN_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT) #define UNITY_TEST_ASSERT_GREATER_THAN_UINT(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
#define UNITY_TEST_ASSERT_GREATER_THAN_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8) #define UNITY_TEST_ASSERT_GREATER_THAN_UINT8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
#define UNITY_TEST_ASSERT_GREATER_THAN_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16) #define UNITY_TEST_ASSERT_GREATER_THAN_UINT16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
#define UNITY_TEST_ASSERT_GREATER_THAN_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32) #define UNITY_TEST_ASSERT_GREATER_THAN_UINT32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
#define UNITY_TEST_ASSERT_GREATER_THAN_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8) #define UNITY_TEST_ASSERT_GREATER_THAN_HEX8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
#define UNITY_TEST_ASSERT_GREATER_THAN_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16) #define UNITY_TEST_ASSERT_GREATER_THAN_HEX16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
#define UNITY_TEST_ASSERT_GREATER_THAN_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32) #define UNITY_TEST_ASSERT_GREATER_THAN_HEX32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
#define UNITY_TEST_ASSERT_GREATER_THAN_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR) #define UNITY_TEST_ASSERT_GREATER_THAN_CHAR(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
#define UNITY_TEST_ASSERT_SMALLER_THAN_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT) #define UNITY_TEST_ASSERT_SMALLER_THAN_INT(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
#define UNITY_TEST_ASSERT_SMALLER_THAN_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8) #define UNITY_TEST_ASSERT_SMALLER_THAN_INT8(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
#define UNITY_TEST_ASSERT_SMALLER_THAN_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16) #define UNITY_TEST_ASSERT_SMALLER_THAN_INT16(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
#define UNITY_TEST_ASSERT_SMALLER_THAN_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32) #define UNITY_TEST_ASSERT_SMALLER_THAN_INT32(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT) #define UNITY_TEST_ASSERT_SMALLER_THAN_UINT(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8) #define UNITY_TEST_ASSERT_SMALLER_THAN_UINT8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16) #define UNITY_TEST_ASSERT_SMALLER_THAN_UINT16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32) #define UNITY_TEST_ASSERT_SMALLER_THAN_UINT32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8) #define UNITY_TEST_ASSERT_SMALLER_THAN_HEX8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16) #define UNITY_TEST_ASSERT_SMALLER_THAN_HEX16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32) #define UNITY_TEST_ASSERT_SMALLER_THAN_HEX32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
#define UNITY_TEST_ASSERT_SMALLER_THAN_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR) #define UNITY_TEST_ASSERT_SMALLER_THAN_CHAR(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 ) (threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 ) (threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16) (threshold), (UNITY_INT)(UNITY_INT16) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16) (threshold), (UNITY_INT)(UNITY_INT16) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32) (threshold), (UNITY_INT)(UNITY_INT32) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32) (threshold), (UNITY_INT)(UNITY_INT32) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT) (threshold), (UNITY_UINT) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 ) (threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 ) (threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT) (threshold), (UNITY_UINT) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT8 )(threshold), (UNITY_UINT)(UNITY_UINT8 )(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT16)(threshold), (UNITY_UINT)(UNITY_UINT16)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(UNITY_UINT32)(threshold), (UNITY_UINT)(UNITY_UINT32)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
#define UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin( (delta), (UNITY_INT) (expected), (UNITY_INT) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT) #define UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, line, message) UnityAssertIntNumbersWithin( (delta), (UNITY_INT) (expected), (UNITY_INT) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
#define UNITY_TEST_ASSERT_INT8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_INT8 ) (expected), (UNITY_INT)(UNITY_INT8 ) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8) #define UNITY_TEST_ASSERT_INT8_WITHIN(delta, expected, actual, line, message) UnityAssertIntNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_INT8 ) (expected), (UNITY_INT)(UNITY_INT8 ) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
#define UNITY_TEST_ASSERT_INT16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT16)(delta), (UNITY_INT)(UNITY_INT16) (expected), (UNITY_INT)(UNITY_INT16) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16) #define UNITY_TEST_ASSERT_INT16_WITHIN(delta, expected, actual, line, message) UnityAssertIntNumbersWithin((UNITY_UINT16 )(delta), (UNITY_INT)(UNITY_INT16) (expected), (UNITY_INT)(UNITY_INT16) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
#define UNITY_TEST_ASSERT_INT32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT32)(delta), (UNITY_INT)(UNITY_INT32) (expected), (UNITY_INT)(UNITY_INT32) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32) #define UNITY_TEST_ASSERT_INT32_WITHIN(delta, expected, actual, line, message) UnityAssertIntNumbersWithin((UNITY_UINT32 )(delta), (UNITY_INT)(UNITY_INT32) (expected), (UNITY_INT)(UNITY_INT32) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
#define UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin( (delta), (UNITY_INT) (expected), (UNITY_INT) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT) #define UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, line, message) UnityAssertUintNumbersWithin( (delta), (UNITY_UINT) (expected), (UNITY_UINT) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
#define UNITY_TEST_ASSERT_UINT8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8 )(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8) #define UNITY_TEST_ASSERT_UINT8_WITHIN(delta, expected, actual, line, message) UnityAssertUintNumbersWithin((UNITY_UINT8 )(delta), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT8 )(expected), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
#define UNITY_TEST_ASSERT_UINT16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT16)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16) #define UNITY_TEST_ASSERT_UINT16_WITHIN(delta, expected, actual, line, message) UnityAssertUintNumbersWithin((UNITY_UINT16)(delta), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
#define UNITY_TEST_ASSERT_UINT32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT32)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32) #define UNITY_TEST_ASSERT_UINT32_WITHIN(delta, expected, actual, line, message) UnityAssertUintNumbersWithin((UNITY_UINT32)(delta), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
#define UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8 )(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8) #define UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, line, message) UnityAssertUintNumbersWithin((UNITY_UINT8 )(delta), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT8 )(expected), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
#define UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT16)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16) #define UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, line, message) UnityAssertUintNumbersWithin((UNITY_UINT16)(delta), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
#define UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT32)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32) #define UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, line, message) UnityAssertUintNumbersWithin((UNITY_UINT32)(delta), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_UINT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
#define UNITY_TEST_ASSERT_CHAR_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_INT8 ) (expected), (UNITY_INT)(UNITY_INT8 ) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR) #define UNITY_TEST_ASSERT_CHAR_WITHIN(delta, expected, actual, line, message) UnityAssertIntNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_INT8 ) (expected), (UNITY_INT)(UNITY_INT8 ) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
#define UNITY_TEST_ASSERT_INT_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin( (delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_INT_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin( (delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT8 )(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT8 )(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8, UNITY_ARRAY_TO_ARRAY)
@@ -997,10 +1077,10 @@ int UnityTestMatches(void);
#define UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT8 )(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT8 )(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT32)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT32)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT8 )(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT8)( delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, line, message) UnityAssertEqualNumber((UNITY_PTR_TO_INT)(expected), (UNITY_PTR_TO_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER) #define UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, line, message) UnityAssertEqualIntNumber((UNITY_PTR_TO_INT)(expected), (UNITY_PTR_TO_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER)
#define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) UnityAssertEqualString((const char*)(expected), (const char*)(actual), (message), (UNITY_LINE_TYPE)(line)) #define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) UnityAssertEqualString((const char*)(expected), (const char*)(actual), (message), (UNITY_LINE_TYPE)(line))
#define UNITY_TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len, line, message) UnityAssertEqualStringLen((const char*)(expected), (const char*)(actual), (UNITY_UINT32)(len), (message), (UNITY_LINE_TYPE)(line)) #define UNITY_TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len, line, message) UnityAssertEqualStringLen((const char*)(expected), (const char*)(actual), (UNITY_UINT32)(len), (message), (UNITY_LINE_TYPE)(line))
#define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), 1, (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), 1, (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
@@ -1038,33 +1118,33 @@ int UnityTestMatches(void);
#define UNITY_TEST_ASSERT_EACH_EQUAL_CHAR(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT8 )(expected), 1), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_VAL) #define UNITY_TEST_ASSERT_EACH_EQUAL_CHAR(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT8 )(expected), 1), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_VAL)
#ifdef UNITY_SUPPORT_64 #ifdef UNITY_SUPPORT_64
#define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64) #define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) UnityAssertEqualIntNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
#define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64) #define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) UnityAssertEqualIntNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
#define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64) #define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) UnityAssertEqualIntNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
#define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EACH_EQUAL_INT64(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT64)(expected), 8), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_VAL) #define UNITY_TEST_ASSERT_EACH_EQUAL_INT64(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT64)(expected), 8), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT64(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_UINT64)(expected), 8), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_VAL) #define UNITY_TEST_ASSERT_EACH_EQUAL_UINT64(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_UINT64)(expected), 8), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX64(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT64)(expected), 8), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_VAL) #define UNITY_TEST_ASSERT_EACH_EQUAL_HEX64(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT64)(expected), 8), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64) #define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) UnityAssertIntNumbersWithin((delta), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
#define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64) #define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, message) UnityAssertUintNumbersWithin((delta), (UNITY_UINT)(expected), (UNITY_UINT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
#define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64) #define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) UnityAssertUintNumbersWithin((delta), (UNITY_UINT)(expected), (UNITY_UINT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
#define UNITY_TEST_ASSERT_NOT_EQUAL_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64) #define UNITY_TEST_ASSERT_NOT_EQUAL_INT64(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64) #define UNITY_TEST_ASSERT_NOT_EQUAL_UINT64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64) #define UNITY_TEST_ASSERT_NOT_EQUAL_HEX64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
#define UNITY_TEST_ASSERT_GREATER_THAN_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64) #define UNITY_TEST_ASSERT_GREATER_THAN_INT64(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
#define UNITY_TEST_ASSERT_GREATER_THAN_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64) #define UNITY_TEST_ASSERT_GREATER_THAN_UINT64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
#define UNITY_TEST_ASSERT_GREATER_THAN_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64) #define UNITY_TEST_ASSERT_GREATER_THAN_HEX64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64) #define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
#define UNITY_TEST_ASSERT_SMALLER_THAN_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64) #define UNITY_TEST_ASSERT_SMALLER_THAN_INT64(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64) #define UNITY_TEST_ASSERT_SMALLER_THAN_UINT64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64) #define UNITY_TEST_ASSERT_SMALLER_THAN_HEX64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64(threshold, actual, line, message) UnityAssertIntGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64) #define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64(threshold, actual, line, message) UnityAssertUintGreaterOrLessOrEqualNumber((UNITY_UINT)(threshold), (UNITY_UINT)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
#define UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_ARRAY) #define UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_ARRAY)
@@ -1179,5 +1259,13 @@ int UnityTestMatches(void);
#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET) #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET)
#endif #endif
#if !defined(UNITY_EXCLUDE_DETAILS) && defined(UNITY_DETAIL_STACK_SIZE)
#define UNITY_DETAIL_PUSH(label, value) UnityPushDetail((UNITY_DETAIL_LABEL_TYPE)(label), (UNITY_DETAIL_VALUE_TYPE)(value), __LINE__)
#define UNITY_DETAIL_POP(label, value) UnityPopDetail((UNITY_DETAIL_LABEL_TYPE)(label), (UNITY_DETAIL_VALUE_TYPE)(value), __LINE__)
#else
#define UNITY_DETAIL_PUSH(label, value) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDetailStack)
#define UNITY_DETAIL_POP(label, value) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDetailStack)
#endif
/* End of UNITY_INTERNALS_H */ /* End of UNITY_INTERNALS_H */
#endif #endif

View File

@@ -10,13 +10,12 @@ CC = clang
endif endif
ifeq ($(findstring clang, $(CC)), clang) ifeq ($(findstring clang, $(CC)), clang)
E = -Weverything E = -Weverything
CFLAGS += $E -Wno-unknown-warning-option -Wno-missing-prototypes CFLAGS += $E -Wno-unknown-warning-option
CFLAGS += -Wno-unused-macros -Wno-padded -Wno-missing-noreturn CFLAGS += -Wno-unsafe-buffer-usage
endif endif
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
#CFLAGS += -Wconversion #disabled because if falsely complains about the isinf and isnan macros #CFLAGS += -Wconversion #disabled because if falsely complains about the isinf and isnan macros
CFLAGS += -Wno-switch-enum -Wno-double-promotion CFLAGS += -Wno-switch-enum -Wno-double-promotion
CFLAGS += -Wno-poison-system-directories
CFLAGS += -Wno-covered-switch-default CFLAGS += -Wno-covered-switch-default
CFLAGS += -Wbad-function-cast -Wcast-qual -Wold-style-definition -Wshadow -Wstrict-overflow \ CFLAGS += -Wbad-function-cast -Wcast-qual -Wold-style-definition -Wshadow -Wstrict-overflow \
-Wstrict-prototypes -Wswitch-default -Wundef -Wstrict-prototypes -Wswitch-default -Wundef

View File

@@ -72,6 +72,11 @@ static char putcharSpyBuffer[SPY_BUFFER_MAX];
static UNITY_COUNTER_TYPE indexSpyBuffer; static UNITY_COUNTER_TYPE indexSpyBuffer;
static UNITY_COUNTER_TYPE putcharSpyEnabled; static UNITY_COUNTER_TYPE putcharSpyEnabled;
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#endif
void startPutcharSpy(void) void startPutcharSpy(void)
{ {
indexSpyBuffer = 0; indexSpyBuffer = 0;
@@ -133,19 +138,30 @@ void flushSpy(void)
if (flushSpyEnabled){ flushSpyCalls++; } if (flushSpyEnabled){ flushSpyCalls++; }
} }
#define TEST_ASSERT_EQUAL_PRINT_NUMBERS(expected, actual) { \ #ifdef __clang__
#pragma clang diagnostic pop
#endif
#define TEST_ASSERT_EQUAL_PRINT_NUMBERS(expected, actual) do { \
startPutcharSpy(); UnityPrintNumber((actual)); endPutcharSpy(); \ startPutcharSpy(); UnityPrintNumber((actual)); endPutcharSpy(); \
TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \ TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \
} } while (0)
#define TEST_ASSERT_EQUAL_PRINT_UNSIGNED_NUMBERS(expected, actual) { \ #define TEST_ASSERT_EQUAL_PRINT_UNSIGNED_NUMBERS(expected, actual) do { \
startPutcharSpy(); UnityPrintNumberUnsigned((actual)); endPutcharSpy(); \ startPutcharSpy(); UnityPrintNumberUnsigned((actual)); endPutcharSpy(); \
TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \ TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \
} } while (0)
#define TEST_ASSERT_EQUAL_PRINT_FLOATING(expected, actual) { \ #define TEST_ASSERT_EQUAL_PRINT_FLOATING(expected, actual) do { \
startPutcharSpy(); UnityPrintFloat((actual)); endPutcharSpy(); \ startPutcharSpy(); UnityPrintFloat((actual)); endPutcharSpy(); \
TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \ TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \
} } while (0)
#endif #endif
// The reason this isn't folded into the above diagnostic is to semi-isolate
// the header contents from the user content it is included into.
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#endif

View File

@@ -61,7 +61,7 @@ void testUnitySizeInitializationReminder(void)
#ifndef UNITY_EXCLUDE_SETJMP_H #ifndef UNITY_EXCLUDE_SETJMP_H
jmp_buf AbortFrame; jmp_buf AbortFrame;
#endif #endif
} _Expected_Unity; } Expected_Unity;
#else #else
struct { struct {
const char* TestFile; const char* TestFile;
@@ -81,7 +81,7 @@ void testUnitySizeInitializationReminder(void)
#ifndef UNITY_EXCLUDE_SETJMP_H #ifndef UNITY_EXCLUDE_SETJMP_H
jmp_buf AbortFrame; jmp_buf AbortFrame;
#endif #endif
} _Expected_Unity; } Expected_Unity;
#endif #endif
/* Compare our fake structure's size to the actual structure's size. They /* Compare our fake structure's size to the actual structure's size. They
@@ -89,22 +89,22 @@ void testUnitySizeInitializationReminder(void)
* *
* This accounts for alignment, padding, and packing issues that might come * This accounts for alignment, padding, and packing issues that might come
* up between different architectures. */ * up between different architectures. */
TEST_ASSERT_EQUAL_MESSAGE(sizeof(_Expected_Unity), sizeof(Unity), message); TEST_ASSERT_EQUAL_MESSAGE(sizeof(Expected_Unity), sizeof(Unity), message);
} }
void testPassShouldEndImmediatelyWithPass(void) UNITY_FUNCTION_ATTR(noreturn) void testPassShouldEndImmediatelyWithPass(void)
{ {
TEST_PASS(); TEST_PASS();
TEST_FAIL_MESSAGE("We should have passed already and finished this test"); TEST_FAIL_MESSAGE("We should have passed already and finished this test");
} }
void testPassShouldEndImmediatelyWithPassAndMessage(void) UNITY_FUNCTION_ATTR(noreturn) void testPassShouldEndImmediatelyWithPassAndMessage(void)
{ {
TEST_PASS_MESSAGE("Woohoo! This Automatically Passes!"); TEST_PASS_MESSAGE("Woohoo! This Automatically Passes!");
TEST_FAIL_MESSAGE("We should have passed already and finished this test"); TEST_FAIL_MESSAGE("We should have passed already and finished this test");
} }
void testMessageShouldDisplayMessageWithoutEndingAndGoOnToPass(void) UNITY_FUNCTION_ATTR(noreturn) void testMessageShouldDisplayMessageWithoutEndingAndGoOnToPass(void)
{ {
TEST_MESSAGE("This is just a message"); TEST_MESSAGE("This is just a message");
TEST_MESSAGE("This is another message"); TEST_MESSAGE("This is another message");
@@ -282,7 +282,7 @@ void testProtection(void)
TEST_ASSERT_EQUAL(3, mask); TEST_ASSERT_EQUAL(3, mask);
} }
void testIgnoredAndThenFailInTearDown(void) UNITY_FUNCTION_ATTR(noreturn) void testIgnoredAndThenFailInTearDown(void)
{ {
SetToOneToFailInTearDown = 1; SetToOneToFailInTearDown = 1;
TEST_IGNORE(); TEST_IGNORE();

View File

@@ -1208,6 +1208,9 @@ void testNotEqualFloatEachEqualLengthZero(void)
#endif #endif
} }
#if defined(UNITY_EXCLUDE_FLOAT_PRINT) || defined(UNITY_INCLUDE_DOUBLE) || !defined(USING_OUTPUT_SPY)
UNITY_FUNCTION_ATTR(noreturn)
#endif
void testFloatPrinting(void) void testFloatPrinting(void)
{ {
#if defined(UNITY_EXCLUDE_FLOAT_PRINT) || defined(UNITY_INCLUDE_DOUBLE) || !defined(USING_OUTPUT_SPY) #if defined(UNITY_EXCLUDE_FLOAT_PRINT) || defined(UNITY_INCLUDE_DOUBLE) || !defined(USING_OUTPUT_SPY)
@@ -1257,6 +1260,9 @@ void testFloatPrinting(void)
#endif #endif
} }
#if defined(UNITY_EXCLUDE_FLOAT_PRINT) || defined(UNITY_INCLUDE_DOUBLE) || !defined(USING_OUTPUT_SPY)
UNITY_FUNCTION_ATTR(noreturn)
#endif
void testFloatPrintingRoundTiesToEven(void) void testFloatPrintingRoundTiesToEven(void)
{ {
#if defined(UNITY_EXCLUDE_FLOAT_PRINT) || defined(UNITY_INCLUDE_DOUBLE) || !defined(USING_OUTPUT_SPY) #if defined(UNITY_EXCLUDE_FLOAT_PRINT) || defined(UNITY_INCLUDE_DOUBLE) || !defined(USING_OUTPUT_SPY)
@@ -1368,6 +1374,9 @@ static void printFloatValue(float f)
#endif #endif
#endif #endif
#if !defined(UNITY_TEST_ALL_FLOATS_PRINT_OK) || !defined(USING_OUTPUT_SPY)
UNITY_FUNCTION_ATTR(noreturn)
#endif
void testFloatPrintingRandomSamples(void) void testFloatPrintingRandomSamples(void)
{ {
#if !defined(UNITY_TEST_ALL_FLOATS_PRINT_OK) || !defined(USING_OUTPUT_SPY) #if !defined(UNITY_TEST_ALL_FLOATS_PRINT_OK) || !defined(USING_OUTPUT_SPY)