mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-27 18:24:27 +01:00
- added ability to parse fun characters like parenthesis in TEST_CASES
- fixed TEST_CASE error git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@115 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
@@ -75,9 +75,14 @@ class UnityTestRunnerGenerator
|
||||
lines.each_with_index do |line, index|
|
||||
#find tests
|
||||
if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+(test.*?)\s*\(\s*(.*)\s*\)/
|
||||
arguments = $1
|
||||
name = $2
|
||||
call = $3
|
||||
args = (@options[:use_param_tests] and $1) ? ($1.gsub(/\s*TEST_CASE\s*\(\s*/,'').strip.split(/\s*\)/).compact) : nil
|
||||
args = nil
|
||||
if (@options[:use_param_tests] and !arguments.empty?)
|
||||
args = []
|
||||
arguments.scan(/\s*TEST_CASE\s*\((.*)\)\s*$/) {|a| args << a[0]}
|
||||
end
|
||||
tests_and_line_numbers << { :name => name, :args => args, :call => call, :line_number => 0 }
|
||||
tests_args = []
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user