Skip to content

Commit

Permalink
Merge pull request ThrowTheSwitch#540 from numaru/master
Browse files Browse the repository at this point in the history
Enlarge the TEST_RANGE() regex to accept more spaces (Thanks for the help, @numaru !)
  • Loading branch information
mvandervoord authored Feb 12, 2021
2 parents 78dea55 + 63fef7d commit 74cde08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auto/generate_test_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def find_tests(source)
arguments.scan(/\s*TEST_CASE\s*\((.*)\)\s*$/) { |a| args << a[0] }

arguments.scan(/\s*TEST_RANGE\s*\((.*)\)\s*$/).flatten.each do |range_str|
args += range_str.scan(/\[(-?\d+.?\d*), *(-?\d+.?\d*), *(-?\d+.?\d*)\]/).map do |arg_values_str|
args += range_str.scan(/\[\s*(-?\d+.?\d*),\s*(-?\d+.?\d*),\s*(-?\d+.?\d*)\s*\]/).map do |arg_values_str|
arg_values_str.map do |arg_value_str|
arg_value_str.include?('.') ? arg_value_str.to_f : arg_value_str.to_i
end
Expand Down

0 comments on commit 74cde08

Please sign in to comment.