mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-10-23 01:07:42 +08:00
Ignore space around parameter in TEST_CASE()
This makes it possible to use defines that expand to something that includes space, e.g. TEST_CASE(true).
This commit is contained in:
@@ -140,7 +140,7 @@ class UnityTestRunnerGenerator
|
||||
|
||||
if @options[:use_param_tests] && !arguments.empty?
|
||||
args = []
|
||||
arguments.scan(/\s*TEST_CASE\s*\((.*)\)\s*$/) { |a| args << a[0] }
|
||||
arguments.scan(/\s*TEST_CASE\s*\(\s*(.*)\s*\)\s*$/) { |a| args << a[0] }
|
||||
|
||||
arguments.scan(/\s*TEST_RANGE\s*\((.*)\)\s*$/).flatten.each do |range_str|
|
||||
args += range_str.scan(/\[\s*(-?\d+.?\d*),\s*(-?\d+.?\d*),\s*(-?\d+.?\d*)\s*\]/).map do |arg_values_str|
|
||||
|
Reference in New Issue
Block a user