1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-29 19:24:27 +01:00

Merge pull request #554 from erijo/single-test-range

Make TEST_RANGE handle a single range
This commit is contained in:
Mark VanderVoord
2022-10-04 21:57:38 -04:00
committed by GitHub

View File

@@ -149,8 +149,8 @@ class UnityTestRunnerGenerator
end end
end.map do |arg_values| end.map do |arg_values|
(arg_values[0]..arg_values[1]).step(arg_values[2]).to_a (arg_values[0]..arg_values[1]).step(arg_values[2]).to_a
end.reduce do |result, arg_range_expanded| end.reduce(nil) do |result, arg_range_expanded|
result.product(arg_range_expanded) result.nil? ? arg_range_expanded.map { |a| [a] } : result.product(arg_range_expanded)
end.map do |arg_combinations| end.map do |arg_combinations|
arg_combinations.flatten.join(', ') arg_combinations.flatten.join(', ')
end end