Skip to content

Commit ff30792

Browse files
authored
Merge branch 'master' into fix-meson-depreciation
2 parents c4d4c65 + e3aa7b4 commit ff30792

125 files changed

Lines changed: 1223 additions & 449 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
github: ThrowTheSwitch
2+
#patreon: # Replace with a single Patreon username
3+
#open_collective: # Replace with a single Open Collective username
4+
#ko_fi: # Replace with a single Ko-fi username
5+
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
6+
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
7+
#liberapay: # Replace with a single Liberapay username
8+
#issuehunt: # Replace with a single IssueHunt username
9+
#lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
10+
#polar: # Replace with a single Polar username
11+
#buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
12+
#thanks_dev: # Replace with a single thanks.dev username
13+
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ project(unity
4444
# Options to Build With Extras -------------------------------------------------
4545
option(UNITY_EXTENSION_FIXTURE "Compiles Unity with the \"fixture\" extension." OFF)
4646
option(UNITY_EXTENSION_MEMORY "Compiles Unity with the \"memory\" extension." OFF)
47+
option(UNITY_SUPPORT_INT64 "Enable 64bit integer support. OFF means autodetect." OFF)
4748

4849
set(UNITY_EXTENSION_FIXTURE_ENABLED $<BOOL:${UNITY_EXTENSION_FIXTURE}>)
4950
set(UNITY_EXTENSION_MEMORY_ENABLED $<OR:${UNITY_EXTENSION_FIXTURE_ENABLED},$<BOOL:${UNITY_EXTENSION_MEMORY}>>)
@@ -56,6 +57,10 @@ if(${UNITY_EXTENSION_MEMORY})
5657
message(STATUS "Unity: Building with the memory extension.")
5758
endif()
5859

60+
if(${UNITY_SUPPORT_INT64})
61+
message(STATUS "Unity: Building with 64bit integer support.")
62+
endif()
63+
5964
# Main target ------------------------------------------------------------------
6065
add_library(${PROJECT_NAME} STATIC)
6166
add_library(${PROJECT_NAME}::framework ALIAS ${PROJECT_NAME})
@@ -89,6 +94,11 @@ set(${PROJECT_NAME}_PUBLIC_HEADERS
8994
$<$<BOOL:${UNITY_EXTENSION_MEMORY_ENABLED}>:${CMAKE_CURRENT_SOURCE_DIR}/extras/memory/src/unity_memory.h>
9095
)
9196

97+
target_compile_definitions(${PROJECT_NAME}
98+
PUBLIC
99+
$<$<BOOL:${UNITY_SUPPORT_INT64}>:UNITY_SUPPORT_64>
100+
)
101+
92102
set_target_properties(${PROJECT_NAME}
93103
PROPERTIES
94104
C_STANDARD 11

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
3+
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Unity Test ![CI][]
22

3-
__Copyright (c) 2007 - 2024 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
3+
__Copyright (c) 2007 - 2026 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
44

55
Welcome to the Unity Test Project, one of the main projects of ThrowTheSwitch.org.
66
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.
7575

7676
Compares two integers for equality and display errors as hexadecimal.
7777
Like the other integer comparisons, you can specify the size...
78-
here the size will also effect how many nibbles are shown (for example, `HEX16` will show 4 nibbles).
78+
here the size will also affect how many nibbles are shown (for example, `HEX16` will show 4 nibbles).
7979

8080
TEST_ASSERT_EQUAL(expected, actual)
8181

auto/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =========================================================================
22
# Unity - A Test Framework for C
33
# ThrowTheSwitch.org
4-
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
4+
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
55
# SPDX-License-Identifier: MIT
66
# =========================================================================
77

auto/colour_prompt.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =========================================================================
22
# Unity - A Test Framework for C
33
# ThrowTheSwitch.org
4-
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
4+
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
55
# SPDX-License-Identifier: MIT
66
# =========================================================================
77

auto/colour_reporter.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =========================================================================
22
# Unity - A Test Framework for C
33
# ThrowTheSwitch.org
4-
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
4+
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
55
# SPDX-License-Identifier: MIT
66
# =========================================================================
77

@@ -19,6 +19,12 @@ def report(message)
1919
colour = case line
2020
when /(?:total\s+)?tests:?\s+(\d+)\s+(?:total\s+)?failures:?\s+\d+\s+Ignored:?/i
2121
Regexp.last_match(1).to_i.zero? ? :green : :red
22+
when /^\[FAIL\]/
23+
:red
24+
when /^\[p \]/
25+
:green
26+
when /^\[i---\]/
27+
:green
2228
when /PASS/
2329
:green
2430
when /^OK$/

auto/extract_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# =========================================================================
33
# Unity - A Test Framework for C
44
# ThrowTheSwitch.org
5-
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
5+
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
66
# SPDX-License-Identifier: MIT
77
# =========================================================================
88

auto/generate_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =========================================================================
22
# Unity - A Test Framework for C
33
# ThrowTheSwitch.org
4-
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
4+
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
55
# SPDX-License-Identifier: MIT
66
# =========================================================================
77

auto/generate_module.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =========================================================================
22
# Unity - A Test Framework for C
33
# ThrowTheSwitch.org
4-
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
4+
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
55
# SPDX-License-Identifier: MIT
66
# =========================================================================
77

@@ -53,7 +53,7 @@ class UnityModuleGenerator
5353
def initialize(options = nil)
5454
@options = UnityModuleGenerator.default_options
5555
case options
56-
when NilClass then @options
56+
when NilClass then nil # leave @options unchanged
5757
when String then @options.merge!(UnityModuleGenerator.grab_config(options))
5858
when Hash then @options.merge!(options)
5959
else raise 'If you specify arguments, it should be a filename or a hash of options'
@@ -158,10 +158,10 @@ def files_to_operate_on(module_name, pattern = nil)
158158
template: cfg[:template],
159159
test_define: cfg[:test_define],
160160
boilerplate: cfg[:boilerplate],
161-
includes: case (cfg[:inc])
162-
when :src then (@options[:includes][:src] || []) | (pattern_traits[:inc].map { |f| format(f, module_name) })
161+
includes: case cfg[:inc]
162+
when :src then (@options[:includes][:src] || []) | pattern_traits[:inc].map { |f| format(f, module_name) }
163163
when :inc then @options[:includes][:inc] || []
164-
when :tst then (@options[:includes][:tst] || []) | (pattern_traits[:inc].map { |f| format("#{@options[:mock_prefix]}#{f}", module_name) })
164+
when :tst then (@options[:includes][:tst] || []) | pattern_traits[:inc].map { |f| format("#{@options[:mock_prefix]}#{f}", module_name) }
165165
end
166166
}
167167
end
@@ -182,7 +182,7 @@ def neutralize_filename(name, start_cap: true)
182182
############################
183183
def create_filename(part1, part2 = '')
184184
name = part2.empty? ? part1 : "#{part1}_#{part2}"
185-
case (@options[:naming])
185+
case @options[:naming]
186186
when 'bumpy' then neutralize_filename(name, start_cap: false).delete('_')
187187
when 'camel' then neutralize_filename(name).delete('_')
188188
when 'snake' then neutralize_filename(name).downcase

0 commit comments

Comments
 (0)