mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-06-05 21:15:22 +00:00
Merge branch 'master' into fix-meson-depreciation
This commit is contained in:
@@ -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']
|
||||||
@@ -44,6 +44,7 @@ project(unity
|
|||||||
# Options to Build With Extras -------------------------------------------------
|
# Options to Build With Extras -------------------------------------------------
|
||||||
option(UNITY_EXTENSION_FIXTURE "Compiles Unity with the \"fixture\" extension." OFF)
|
option(UNITY_EXTENSION_FIXTURE "Compiles Unity with the \"fixture\" extension." OFF)
|
||||||
option(UNITY_EXTENSION_MEMORY "Compiles Unity with the \"memory\" extension." OFF)
|
option(UNITY_EXTENSION_MEMORY "Compiles Unity with the \"memory\" extension." OFF)
|
||||||
|
option(UNITY_SUPPORT_INT64 "Enable 64bit integer support. OFF means autodetect." OFF)
|
||||||
|
|
||||||
set(UNITY_EXTENSION_FIXTURE_ENABLED $<BOOL:${UNITY_EXTENSION_FIXTURE}>)
|
set(UNITY_EXTENSION_FIXTURE_ENABLED $<BOOL:${UNITY_EXTENSION_FIXTURE}>)
|
||||||
set(UNITY_EXTENSION_MEMORY_ENABLED $<OR:${UNITY_EXTENSION_FIXTURE_ENABLED},$<BOOL:${UNITY_EXTENSION_MEMORY}>>)
|
set(UNITY_EXTENSION_MEMORY_ENABLED $<OR:${UNITY_EXTENSION_FIXTURE_ENABLED},$<BOOL:${UNITY_EXTENSION_MEMORY}>>)
|
||||||
@@ -56,6 +57,10 @@ if(${UNITY_EXTENSION_MEMORY})
|
|||||||
message(STATUS "Unity: Building with the memory extension.")
|
message(STATUS "Unity: Building with the memory extension.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(${UNITY_SUPPORT_INT64})
|
||||||
|
message(STATUS "Unity: Building with 64bit integer support.")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Main target ------------------------------------------------------------------
|
# Main target ------------------------------------------------------------------
|
||||||
add_library(${PROJECT_NAME} STATIC)
|
add_library(${PROJECT_NAME} STATIC)
|
||||||
add_library(${PROJECT_NAME}::framework ALIAS ${PROJECT_NAME})
|
add_library(${PROJECT_NAME}::framework ALIAS ${PROJECT_NAME})
|
||||||
@@ -89,6 +94,11 @@ set(${PROJECT_NAME}_PUBLIC_HEADERS
|
|||||||
$<$<BOOL:${UNITY_EXTENSION_MEMORY_ENABLED}>:${CMAKE_CURRENT_SOURCE_DIR}/extras/memory/src/unity_memory.h>
|
$<$<BOOL:${UNITY_EXTENSION_MEMORY_ENABLED}>:${CMAKE_CURRENT_SOURCE_DIR}/extras/memory/src/unity_memory.h>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
$<$<BOOL:${UNITY_SUPPORT_INT64}>:UNITY_SUPPORT_64>
|
||||||
|
)
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME}
|
set_target_properties(${PROJECT_NAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
C_STANDARD 11
|
C_STANDARD 11
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Unity Test ![CI][]
|
# Unity Test ![CI][]
|
||||||
|
|
||||||
__Copyright (c) 2007 - 2024 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
|
__Copyright (c) 2007 - 2026 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
|
||||||
|
|
||||||
Welcome to the Unity Test Project, one of the main projects of ThrowTheSwitch.org.
|
Welcome to the Unity Test Project, one of the main projects of ThrowTheSwitch.org.
|
||||||
Unity Test is a unit testing framework built for C, with a focus on working with embedded toolchains.
|
Unity Test is a unit testing framework built for C, with a focus on working with embedded toolchains.
|
||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -19,6 +19,12 @@ def report(message)
|
|||||||
colour = case line
|
colour = case line
|
||||||
when /(?:total\s+)?tests:?\s+(\d+)\s+(?:total\s+)?failures:?\s+\d+\s+Ignored:?/i
|
when /(?:total\s+)?tests:?\s+(\d+)\s+(?:total\s+)?failures:?\s+\d+\s+Ignored:?/i
|
||||||
Regexp.last_match(1).to_i.zero? ? :green : :red
|
Regexp.last_match(1).to_i.zero? ? :green : :red
|
||||||
|
when /^\[FAIL\]/
|
||||||
|
:red
|
||||||
|
when /^\[p \]/
|
||||||
|
:green
|
||||||
|
when /^\[i---\]/
|
||||||
|
:green
|
||||||
when /PASS/
|
when /PASS/
|
||||||
:green
|
:green
|
||||||
when /^OK$/
|
when /^OK$/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ class UnityModuleGenerator
|
|||||||
def initialize(options = nil)
|
def initialize(options = nil)
|
||||||
@options = UnityModuleGenerator.default_options
|
@options = UnityModuleGenerator.default_options
|
||||||
case options
|
case options
|
||||||
when NilClass then @options
|
when NilClass then nil # leave @options unchanged
|
||||||
when String then @options.merge!(UnityModuleGenerator.grab_config(options))
|
when String then @options.merge!(UnityModuleGenerator.grab_config(options))
|
||||||
when Hash then @options.merge!(options)
|
when Hash then @options.merge!(options)
|
||||||
else raise 'If you specify arguments, it should be a filename or a hash of options'
|
else raise 'If you specify arguments, it should be a filename or a hash of options'
|
||||||
@@ -158,10 +158,10 @@ class UnityModuleGenerator
|
|||||||
template: cfg[:template],
|
template: cfg[:template],
|
||||||
test_define: cfg[:test_define],
|
test_define: cfg[:test_define],
|
||||||
boilerplate: cfg[:boilerplate],
|
boilerplate: cfg[:boilerplate],
|
||||||
includes: case (cfg[:inc])
|
includes: case cfg[:inc]
|
||||||
when :src then (@options[:includes][:src] || []) | (pattern_traits[:inc].map { |f| format(f, module_name) })
|
when :src then (@options[:includes][:src] || []) | pattern_traits[:inc].map { |f| format(f, module_name) }
|
||||||
when :inc then @options[:includes][:inc] || []
|
when :inc then @options[:includes][:inc] || []
|
||||||
when :tst then (@options[:includes][:tst] || []) | (pattern_traits[:inc].map { |f| format("#{@options[:mock_prefix]}#{f}", module_name) })
|
when :tst then (@options[:includes][:tst] || []) | pattern_traits[:inc].map { |f| format("#{@options[:mock_prefix]}#{f}", module_name) }
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -182,7 +182,7 @@ class UnityModuleGenerator
|
|||||||
############################
|
############################
|
||||||
def create_filename(part1, part2 = '')
|
def create_filename(part1, part2 = '')
|
||||||
name = part2.empty? ? part1 : "#{part1}_#{part2}"
|
name = part2.empty? ? part1 : "#{part1}_#{part2}"
|
||||||
case (@options[:naming])
|
case @options[:naming]
|
||||||
when 'bumpy' then neutralize_filename(name, start_cap: false).delete('_')
|
when 'bumpy' then neutralize_filename(name, start_cap: false).delete('_')
|
||||||
when 'camel' then neutralize_filename(name).delete('_')
|
when 'camel' then neutralize_filename(name).delete('_')
|
||||||
when 'snake' then neutralize_filename(name).downcase
|
when 'snake' then neutralize_filename(name).downcase
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/ruby
|
#!/usr/bin/env ruby
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ class UnityTestRunnerGenerator
|
|||||||
@options = UnityTestRunnerGenerator.default_options
|
@options = UnityTestRunnerGenerator.default_options
|
||||||
case options
|
case options
|
||||||
when NilClass
|
when NilClass
|
||||||
@options
|
nil # leave @options unchanged
|
||||||
when String
|
when String
|
||||||
@options.merge!(UnityTestRunnerGenerator.grab_config(options))
|
@options.merge!(UnityTestRunnerGenerator.grab_config(options))
|
||||||
when Hash
|
when Hash
|
||||||
@@ -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
|
||||||
|
|
||||||
@@ -70,7 +72,7 @@ class UnityTestRunnerGenerator
|
|||||||
source = source.force_encoding('ISO-8859-1').encode('utf-8', replace: nil)
|
source = source.force_encoding('ISO-8859-1').encode('utf-8', replace: nil)
|
||||||
tests = find_tests(source)
|
tests = find_tests(source)
|
||||||
headers = find_includes(source)
|
headers = find_includes(source)
|
||||||
testfile_includes = @options[:use_system_files] ? (headers[:local] + headers[:system]) : (headers[:local])
|
testfile_includes = @options[:use_system_files] ? (headers[:local] + headers[:system]) : headers[:local]
|
||||||
used_mocks = find_mocks(testfile_includes)
|
used_mocks = find_mocks(testfile_includes)
|
||||||
testfile_includes = (testfile_includes - used_mocks)
|
testfile_includes = (testfile_includes - used_mocks)
|
||||||
testfile_includes.delete_if { |inc| inc =~ /(unity|cmock)/ }
|
testfile_includes.delete_if { |inc| inc =~ /(unity|cmock)/ }
|
||||||
@@ -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,32 @@ 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 { idx += 1 }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
idx
|
||||||
|
else
|
||||||
|
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 +296,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,9 +428,25 @@ 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
|
||||||
if @options[:cmdline_args]
|
if @options[:cmdline_args]
|
||||||
if main_name != 'main'
|
if main_name != 'main'
|
||||||
output.puts("#{@options[:main_export_decl]} int #{main_name}(int argc, char** argv);")
|
output.puts("#{@options[:main_export_decl]} int #{main_name}(int argc, char** argv);")
|
||||||
@@ -410,12 +462,12 @@ class UnityTestRunnerGenerator
|
|||||||
output.puts(" UnityPrint(\"#{filename.gsub('.c', '').gsub(/\\/, '\\\\\\')}.\");")
|
output.puts(" UnityPrint(\"#{filename.gsub('.c', '').gsub(/\\/, '\\\\\\')}.\");")
|
||||||
output.puts(' UNITY_PRINT_EOL();')
|
output.puts(' UNITY_PRINT_EOL();')
|
||||||
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(" UnityPrint(\" #{test[:test]}\");")
|
output.puts(" UnityPrint(\" #{test[:test]}\");")
|
||||||
output.puts(' UNITY_PRINT_EOL();')
|
output.puts(' UNITY_PRINT_EOL();')
|
||||||
else
|
else
|
||||||
test[:args].each do |args|
|
test[:args].each do |args|
|
||||||
output.puts(" UnityPrint(\" #{test[:test]}(#{args})\");")
|
output.puts(" UnityPrint(\" #{test[:test]}(#{args.gsub('"', '').gsub("\n", '')})\");")
|
||||||
output.puts(' UNITY_PRINT_EOL();')
|
output.puts(' UNITY_PRINT_EOL();')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -439,18 +491,46 @@ class UnityTestRunnerGenerator
|
|||||||
else
|
else
|
||||||
output.puts(" UnityBegin(\"#{filename.gsub(/\\/, '\\\\\\')}\");")
|
output.puts(" UnityBegin(\"#{filename.gsub(/\\/, '\\\\\\')}\");")
|
||||||
end
|
end
|
||||||
tests.each do |test|
|
if @options[:shuffle_tests]
|
||||||
if (!@options[:use_param_tests]) || test[:args].nil? || test[:args].empty?
|
output.puts
|
||||||
output.puts(" run_test(#{test[:test]}, \"#{test[:test]}\", #{test[:line_number]});")
|
if @options[:rng_seed] == 0
|
||||||
|
output.puts(' srand(time(NULL));')
|
||||||
else
|
else
|
||||||
test[:args].each.with_index(1) do |args, idx|
|
output.puts(" srand(#{@options[:rng_seed]});")
|
||||||
wrapper = "runner_args#{idx}_#{test[:test]}"
|
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|
|
||||||
|
if !@options[:use_param_tests] || test[:args].nil? || test[:args].empty?
|
||||||
|
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
|
||||||
|
test[:args].each.with_index(1) do |args, arg_idx|
|
||||||
|
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 +616,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
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#! python3
|
#!/usr/bin/env python3
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/ruby
|
#!/usr/bin/env ruby
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#! python3
|
#!/usr/bin/env python3
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
Regular → Executable
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
# !/usr/bin/ruby
|
|
||||||
#
|
#
|
||||||
# unity_test_summary.rb
|
# unity_test_summary.rb
|
||||||
#
|
#
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
@@ -184,4 +184,4 @@ Good enough?
|
|||||||
|
|
||||||
*Find The Latest of This And More at [ThrowTheSwitch.org][]*
|
*Find The Latest of This And More at [ThrowTheSwitch.org][]*
|
||||||
|
|
||||||
[ThrowTheSwitch.org]: https://throwtheswitch.org
|
[ThrowTheSwitch.org]: https://throwtheswitch.org
|
||||||
|
|||||||
@@ -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 It’s Assertions](#unity-is-several-things-but-mainly-its-assertions)
|
||||||
|
3. [What’s an Assertion?](#whats-an-assertion)
|
||||||
|
4. [Unity’s 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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ end
|
|||||||
def link_it(exe_name, obj_list)
|
def link_it(exe_name, obj_list)
|
||||||
linker = build_linker_fields
|
linker = build_linker_fields
|
||||||
cmd_str = "#{linker[:command]}#{linker[:options]}#{linker[:includes]}"
|
cmd_str = "#{linker[:command]}#{linker[:options]}#{linker[:includes]}"
|
||||||
cmd_str += " #{(obj_list.map { |obj| "#{$cfg['linker']['object_files']['path']}#{obj}" }).join(' ')}"
|
cmd_str += " #{obj_list.map { |obj| "#{$cfg['linker']['object_files']['path']}#{obj}" }.join(' ')}"
|
||||||
cmd_str += " #{$cfg['linker']['bin_files']['prefix']} "
|
cmd_str += " #{$cfg['linker']['bin_files']['prefix']} "
|
||||||
cmd_str += $cfg['linker']['bin_files']['destination']
|
cmd_str += $cfg['linker']['bin_files']['destination']
|
||||||
cmd_str += exe_name + $cfg['linker']['bin_files']['extension']
|
cmd_str += exe_name + $cfg['linker']['bin_files']['extension']
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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`
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/* =========================================================================
|
||||||
|
Unity - A Test Framework for C
|
||||||
|
ThrowTheSwitch.org
|
||||||
|
Copyright (c) 2007-26 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__);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/* =========================================================================
|
||||||
|
Unity - A Test Framework for C
|
||||||
|
ThrowTheSwitch.org
|
||||||
|
Copyright (c) 2007-26 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);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[wrap-git]
|
||||||
|
url = https://github.com/ThrowTheSwitch/Unity.git
|
||||||
|
revision = head
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/* =========================================================================
|
||||||
|
Unity - A Test Framework for C
|
||||||
|
ThrowTheSwitch.org
|
||||||
|
Copyright (c) 2007-26 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/* =========================================================================
|
||||||
|
Unity - A Test Framework for C
|
||||||
|
ThrowTheSwitch.org
|
||||||
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
|
SPDX-License-Identifier: MIT
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
|
#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;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
# =========================================================================
|
|
||||||
# Unity - A Test Framework for C
|
|
||||||
# ThrowTheSwitch.org
|
|
||||||
# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
# =========================================================================
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Unity",
|
"name": "Unity",
|
||||||
"version": "2.6.0",
|
"version": "2.6.0",
|
||||||
|
|||||||
+16
-8
@@ -26,6 +26,8 @@ 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')
|
||||||
|
support_int64 = get_option('support_int64')
|
||||||
|
fixture_help_message = get_option('fixture_help_message')
|
||||||
|
|
||||||
unity_args = []
|
unity_args = []
|
||||||
unity_src = []
|
unity_src = []
|
||||||
@@ -34,20 +36,26 @@ 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
|
||||||
unity_args += '-DUNITY_INCLUDE_DOUBLE'
|
unity_args += '-DUNITY_INCLUDE_DOUBLE'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if support_int64
|
||||||
|
unity_args += '-DUNITY_SUPPORT_64'
|
||||||
|
endif
|
||||||
|
|
||||||
unity_lib = static_library(meson.project_name(),
|
unity_lib = static_library(meson.project_name(),
|
||||||
sources: unity_src,
|
sources: unity_src,
|
||||||
c_args: unity_args,
|
c_args: unity_args,
|
||||||
@@ -64,10 +72,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
|
||||||
|
|
||||||
@@ -76,5 +84,5 @@ endif
|
|||||||
gen_test_runner = generator(
|
gen_test_runner = generator(
|
||||||
find_program('auto/generate_test_runner.rb'),
|
find_program('auto/generate_test_runner.rb'),
|
||||||
output: '@BASENAME@_Runner.c',
|
output: '@BASENAME@_Runner.c',
|
||||||
arguments: ['@INPUT@', '@OUTPUT@']
|
arguments: ['@EXTRA_ARGS@', '@INPUT@', '@OUTPUT@']
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
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: 'boolean', value: false, description: 'Whether to enable the memory extension.')
|
||||||
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('support_int64', type: 'boolean', value: false, description: 'Whether to enable support for 64bit integers. false means autodetect.')
|
||||||
|
option('fixture_help_message', type: 'string', description: 'If the fixture extension is enabled, this allows a custom help message to be defined.')
|
||||||
|
|||||||
+269
-133
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ const char UNITY_PROGMEM UnityStrFail[] = "FAIL";
|
|||||||
const char UNITY_PROGMEM UnityStrIgnore[] = "IGNORE";
|
const char UNITY_PROGMEM UnityStrIgnore[] = "IGNORE";
|
||||||
#endif
|
#endif
|
||||||
static const char UNITY_PROGMEM UnityStrNull[] = "NULL";
|
static const char UNITY_PROGMEM UnityStrNull[] = "NULL";
|
||||||
static const char UNITY_PROGMEM UnityStrSpacer[] = ". ";
|
static const char UNITY_PROGMEM UnityStrSpacer[] = UNITY_FAILURE_DETAIL_SEPARATOR;
|
||||||
static const char UNITY_PROGMEM UnityStrExpected[] = " Expected ";
|
static const char UNITY_PROGMEM UnityStrExpected[] = " Expected ";
|
||||||
static const char UNITY_PROGMEM UnityStrWas[] = " Was ";
|
static const char UNITY_PROGMEM UnityStrWas[] = " Was ";
|
||||||
static const char UNITY_PROGMEM UnityStrGt[] = " to be greater than ";
|
static const char UNITY_PROGMEM UnityStrGt[] = " to be greater than ";
|
||||||
@@ -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,43 +195,40 @@ 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_STYLE_CHAR)
|
||||||
{
|
{
|
||||||
if (style == UNITY_DISPLAY_STYLE_CHAR)
|
/* printable characters plus CR & LF are printed */
|
||||||
|
UNITY_OUTPUT_CHAR('\'');
|
||||||
|
if ((number <= 126) && (number >= 32))
|
||||||
{
|
{
|
||||||
/* printable characters plus CR & LF are printed */
|
UNITY_OUTPUT_CHAR((int)number);
|
||||||
UNITY_OUTPUT_CHAR('\'');
|
|
||||||
if ((number <= 126) && (number >= 32))
|
|
||||||
{
|
|
||||||
UNITY_OUTPUT_CHAR((int)number);
|
|
||||||
}
|
|
||||||
/* write escaped carriage returns */
|
|
||||||
else if (number == 13)
|
|
||||||
{
|
|
||||||
UNITY_OUTPUT_CHAR('\\');
|
|
||||||
UNITY_OUTPUT_CHAR('r');
|
|
||||||
}
|
|
||||||
/* write escaped line feeds */
|
|
||||||
else if (number == 10)
|
|
||||||
{
|
|
||||||
UNITY_OUTPUT_CHAR('\\');
|
|
||||||
UNITY_OUTPUT_CHAR('n');
|
|
||||||
}
|
|
||||||
/* unprintable characters are shown as codes */
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UNITY_OUTPUT_CHAR('\\');
|
|
||||||
UNITY_OUTPUT_CHAR('x');
|
|
||||||
UnityPrintNumberHex((UNITY_UINT)number, 2);
|
|
||||||
}
|
|
||||||
UNITY_OUTPUT_CHAR('\'');
|
|
||||||
}
|
}
|
||||||
|
/* write escaped carriage returns */
|
||||||
|
else if (number == 13)
|
||||||
|
{
|
||||||
|
UNITY_OUTPUT_CHAR('\\');
|
||||||
|
UNITY_OUTPUT_CHAR('r');
|
||||||
|
}
|
||||||
|
/* write escaped line feeds */
|
||||||
|
else if (number == 10)
|
||||||
|
{
|
||||||
|
UNITY_OUTPUT_CHAR('\\');
|
||||||
|
UNITY_OUTPUT_CHAR('n');
|
||||||
|
}
|
||||||
|
/* unprintable characters are shown as codes */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UnityPrintNumber(number);
|
UNITY_OUTPUT_CHAR('\\');
|
||||||
|
UNITY_OUTPUT_CHAR('x');
|
||||||
|
UnityPrintNumberHex((UNITY_UINT)number, 2);
|
||||||
}
|
}
|
||||||
|
UNITY_OUTPUT_CHAR('\'');
|
||||||
|
}
|
||||||
|
else if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
|
||||||
|
{
|
||||||
|
UnityPrintNumber(number);
|
||||||
}
|
}
|
||||||
else if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT)
|
else if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT)
|
||||||
{
|
{
|
||||||
@@ -235,6 +242,20 @@ void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UnityPrintUintNumberByStyle(const UNITY_UINT number, const UNITY_DISPLAY_STYLE_T style)
|
||||||
|
{
|
||||||
|
if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT)
|
||||||
|
{
|
||||||
|
UnityPrintNumberUnsigned(number);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UNITY_OUTPUT_CHAR('0');
|
||||||
|
UNITY_OUTPUT_CHAR('x');
|
||||||
|
UnityPrintNumberHex((UNITY_UINT)number, (char)((style & 0xF) * 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------*/
|
/*-----------------------------------------------*/
|
||||||
void UnityPrintNumber(const UNITY_INT number_to_print)
|
void UnityPrintNumber(const UNITY_INT number_to_print)
|
||||||
{
|
{
|
||||||
@@ -345,13 +366,6 @@ void UnityPrintFloat(const UNITY_DOUBLE input_number)
|
|||||||
|
|
||||||
UNITY_DOUBLE number = input_number;
|
UNITY_DOUBLE number = input_number;
|
||||||
|
|
||||||
/* print minus sign (does not handle negative zero) */
|
|
||||||
if (number < 0.0f)
|
|
||||||
{
|
|
||||||
UNITY_OUTPUT_CHAR('-');
|
|
||||||
number = -number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* handle zero, NaN, and +/- infinity */
|
/* handle zero, NaN, and +/- infinity */
|
||||||
if (number == 0.0f)
|
if (number == 0.0f)
|
||||||
{
|
{
|
||||||
@@ -359,11 +373,18 @@ void UnityPrintFloat(const UNITY_DOUBLE input_number)
|
|||||||
}
|
}
|
||||||
else if (UNITY_IS_NAN(number))
|
else if (UNITY_IS_NAN(number))
|
||||||
{
|
{
|
||||||
UnityPrint("nan");
|
UnityPrint(UnityStrNaN);
|
||||||
}
|
}
|
||||||
else if (UNITY_IS_INF(number))
|
else if (UNITY_IS_INF(number))
|
||||||
{
|
{
|
||||||
UnityPrint("inf");
|
if (number < 0.0f)
|
||||||
|
{
|
||||||
|
UnityPrint(UnityStrNegInf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UnityPrint(UnityStrInf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -374,6 +395,11 @@ void UnityPrintFloat(const UNITY_DOUBLE input_number)
|
|||||||
int digits;
|
int digits;
|
||||||
char buf[16] = {0};
|
char buf[16] = {0};
|
||||||
|
|
||||||
|
if (number < 0.0f)
|
||||||
|
{
|
||||||
|
UNITY_OUTPUT_CHAR('-');
|
||||||
|
number = -number;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Scale up or down by powers of 10. To minimize rounding error,
|
* Scale up or down by powers of 10. To minimize rounding error,
|
||||||
* start with a factor/divisor of 10^10, which is the largest
|
* start with a factor/divisor of 10^10, which is the largest
|
||||||
@@ -574,6 +600,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 +637,7 @@ static void UnityAddMsgIfSpecified(const char* msg)
|
|||||||
UnityPrint(Unity.CurrentDetail2);
|
UnityPrint(Unity.CurrentDetail2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
if (msg)
|
if (msg)
|
||||||
{
|
{
|
||||||
@@ -709,11 +762,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 +774,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;
|
||||||
}
|
}
|
||||||
@@ -786,6 +880,8 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
|
|||||||
const UNITY_DISPLAY_STYLE_T style,
|
const UNITY_DISPLAY_STYLE_T style,
|
||||||
const UNITY_FLAGS_T flags)
|
const UNITY_FLAGS_T flags)
|
||||||
{
|
{
|
||||||
|
UNITY_INT expect_val = 0;
|
||||||
|
UNITY_INT actual_val = 0;
|
||||||
UNITY_UINT32 elements = num_elements;
|
UNITY_UINT32 elements = num_elements;
|
||||||
unsigned int length = style & 0xF;
|
unsigned int length = style & 0xF;
|
||||||
unsigned int increment = 0;
|
unsigned int increment = 0;
|
||||||
@@ -813,9 +909,6 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
|
|||||||
|
|
||||||
while ((elements > 0) && (elements--))
|
while ((elements > 0) && (elements--))
|
||||||
{
|
{
|
||||||
UNITY_INT expect_val;
|
|
||||||
UNITY_INT actual_val;
|
|
||||||
|
|
||||||
switch (length)
|
switch (length)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
@@ -877,9 +970,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 +1121,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 +1175,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 +1350,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 +1404,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 +1474,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 +1683,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 +1920,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 +2052,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 +2069,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 +2242,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 +2285,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 +2359,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 +2530,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;
|
||||||
|
|||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
@@ -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 3
|
||||||
#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
|
||||||
|
|||||||
+234
-134
@@ -1,7 +1,7 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
Unity - A Test Framework for C
|
Unity - A Test Framework for C
|
||||||
ThrowTheSwitch.org
|
ThrowTheSwitch.org
|
||||||
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
@@ -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
|
||||||
@@ -425,6 +432,10 @@ typedef UNITY_FLOAT_TYPE UNITY_FLOAT;
|
|||||||
#define UNITY_PRINT_EXEC_TIME() do { /* nothing*/ } while (0)
|
#define UNITY_PRINT_EXEC_TIME() do { /* nothing*/ } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef UNITY_FAILURE_DETAIL_SEPARATOR
|
||||||
|
#define UNITY_FAILURE_DETAIL_SEPARATOR ":"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-------------------------------------------------------
|
/*-------------------------------------------------------
|
||||||
* Footprint
|
* Footprint
|
||||||
*-------------------------------------------------------*/
|
*-------------------------------------------------------*/
|
||||||
@@ -438,7 +449,7 @@ typedef UNITY_FLOAT_TYPE UNITY_FLOAT;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*-------------------------------------------------------
|
/*-------------------------------------------------------
|
||||||
* Internal Structs Needed
|
* Internal Types Needed
|
||||||
*-------------------------------------------------------*/
|
*-------------------------------------------------------*/
|
||||||
|
|
||||||
typedef void (*UnityTestFunction)(void);
|
typedef void (*UnityTestFunction)(void);
|
||||||
@@ -480,14 +491,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 +521,34 @@ 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
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wpadded"
|
||||||
|
#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;
|
||||||
@@ -534,6 +564,9 @@ struct UNITY_STORAGE_T
|
|||||||
jmp_buf AbortFrame;
|
jmp_buf AbortFrame;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
extern struct UNITY_STORAGE_T Unity;
|
extern struct UNITY_STORAGE_T Unity;
|
||||||
|
|
||||||
@@ -561,10 +594,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 +601,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 +660,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 +678,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 +744,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,
|
||||||
@@ -777,6 +868,7 @@ extern const char UnityStrErrFloat[];
|
|||||||
extern const char UnityStrErrDouble[];
|
extern const char UnityStrErrDouble[];
|
||||||
extern const char UnityStrErr64[];
|
extern const char UnityStrErr64[];
|
||||||
extern const char UnityStrErrShorthand[];
|
extern const char UnityStrErrShorthand[];
|
||||||
|
extern const char UnityStrErrDetailStack[];
|
||||||
|
|
||||||
/*-------------------------------------------------------
|
/*-------------------------------------------------------
|
||||||
* Test Running Macros
|
* Test Running Macros
|
||||||
@@ -894,97 +986,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 +1089,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 +1130,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 +1271,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
|
||||||
|
|||||||
+2
-3
@@ -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
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ namespace :style do
|
|||||||
end
|
end
|
||||||
|
|
||||||
task :clean do
|
task :clean do
|
||||||
File.delete(".rubocop_todo.yml") if File.exists?(".rubocop_todo.yml")
|
File.delete(".rubocop_todo.yml") if File.exist?(".rubocop_todo.yml")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+62
-2
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -293,8 +293,68 @@ module RakefileHelpers
|
|||||||
# Link the test executable
|
# Link the test executable
|
||||||
link_it(test_base, obj_list)
|
link_it(test_base, obj_list)
|
||||||
|
|
||||||
# Execute unit test and generate results file
|
# Execute unit test
|
||||||
output = runtest(test_base)
|
output = runtest(test_base)
|
||||||
|
|
||||||
|
# This is a list of all non-string valid outputs
|
||||||
|
# (in order) this is the following options:
|
||||||
|
# valid binary representations
|
||||||
|
# valid hexadecimal representation
|
||||||
|
# valid integer (signed or unsigned) or float values of any precision
|
||||||
|
# valid floating point special-case verbage
|
||||||
|
# valid boolean verbage
|
||||||
|
# valid pointer verbage
|
||||||
|
# string representations
|
||||||
|
# character representations
|
||||||
|
valid_vals_regexes = [
|
||||||
|
/[01X]+/,
|
||||||
|
/0x[0-9A-Fa-f]+/,
|
||||||
|
/-?\d+(?:\.\d+)?/,
|
||||||
|
/(?:Not )?(?:Negative )?(?:Infinity|NaN|Determinate|Invalid Float Trait)/,
|
||||||
|
/TRUE|FALSE/,
|
||||||
|
/NULL/,
|
||||||
|
/"[^"]*"/,
|
||||||
|
/'[^']*'/
|
||||||
|
]
|
||||||
|
valid_vals = "(?:#{valid_vals_regexes.map(&:source).join('|')})"
|
||||||
|
|
||||||
|
# Verify outputs seem to have happened
|
||||||
|
failures = 0
|
||||||
|
output = output.each_line.map do |line|
|
||||||
|
if (line =~ /(?:Delta.*)?(?:Element.*)?Expected.*Was/)
|
||||||
|
if !(line =~ /(?:Delta \d+ )?(?:Element \d+ )?Expected #{valid_vals} Was #{valid_vals}/)
|
||||||
|
failures += 1
|
||||||
|
"[FAIL] " + line.sub(/:PASS$/,":FAIL:Output Format Failure")
|
||||||
|
else
|
||||||
|
"[p ] " + line
|
||||||
|
end
|
||||||
|
elsif (line =~ /:PASS$/)
|
||||||
|
"[p ] " + line
|
||||||
|
elsif (line =~ /:FAIL(?:[^:])$/) || (line =~ /^FAILED$/)
|
||||||
|
#failure has already been counted therefore do not add
|
||||||
|
"[FAIL] " + line
|
||||||
|
elsif (line =~ /:IGNORE$/)
|
||||||
|
#ignore has already been counted therefore do not add
|
||||||
|
"[i---] " + line
|
||||||
|
else
|
||||||
|
"[ ] " + line
|
||||||
|
end
|
||||||
|
end.join
|
||||||
|
|
||||||
|
# Update the final test summary
|
||||||
|
if failures > 0
|
||||||
|
output.sub!(/^(?:\[ \] )?(\d+) Tests (\d+) Failures (\d+) Ignored/) do
|
||||||
|
tests = $1
|
||||||
|
failures = $2.to_i + failures
|
||||||
|
ignored = $3
|
||||||
|
"[ ] #{tests} Tests #{failures} Failures #{ignored} Ignored"
|
||||||
|
end
|
||||||
|
output.sub!(/\[ \] OK$/,"[FAIL] FAILED")
|
||||||
|
report output
|
||||||
|
raise "Command failed. (#{failures.to_s} Output Formatting Issues)"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Generate results file
|
||||||
save_test_results(test_base, output)
|
save_test_results(test_base, output)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# Unity - A Test Framework for C
|
# Unity - A Test Framework for C
|
||||||
# ThrowTheSwitch.org
|
# ThrowTheSwitch.org
|
||||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user