mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-26 18:01:35 +01:00
- added array handling for smaller integer types
- added array handling for floats - cleaned up filename handling in scripts git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@67 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
@@ -41,7 +41,7 @@ class UnityTestRunnerGenerator
|
||||
used_mocks = find_mocks(includes)
|
||||
end
|
||||
|
||||
puts "Creating test runner for #{File.basename(input_file)}..."
|
||||
puts "Creating test runner for #{module_name}..."
|
||||
|
||||
#build runner file
|
||||
File.open(output_file, 'w') do |output|
|
||||
@@ -50,7 +50,7 @@ class UnityTestRunnerGenerator
|
||||
create_mock_management(output, used_mocks)
|
||||
create_runtest(output, used_mocks)
|
||||
create_reset(output, used_mocks)
|
||||
create_main(output, module_name, tests)
|
||||
create_main(output, input_file, tests)
|
||||
end
|
||||
|
||||
all_files_used = [input_file, output_file]
|
||||
@@ -208,12 +208,12 @@ class UnityTestRunnerGenerator
|
||||
output.puts("}")
|
||||
end
|
||||
|
||||
def create_main(output, module_name, tests)
|
||||
def create_main(output, filename, tests)
|
||||
output.puts()
|
||||
output.puts()
|
||||
output.puts("int main(void)")
|
||||
output.puts("{")
|
||||
output.puts(" Unity.TestFile = \"#{module_name}\";")
|
||||
output.puts(" Unity.TestFile = \"#{filename}\";")
|
||||
output.puts(" UnityBegin();")
|
||||
output.puts()
|
||||
|
||||
|
||||
@@ -88,8 +88,8 @@ class UnityTestSummary
|
||||
def get_details(result_file, lines)
|
||||
results = { :failures => [], :ignores => [], :successes => [] }
|
||||
lines.each do |line|
|
||||
line_out = line.gsub(/\//, "\\")
|
||||
src_file,src_line,test_name,status,msg = line.split(/:/)
|
||||
line_out = ((@root and (@root != 0)) ? "#{@root}#{line}" : line ).gsub(/\//, "\\")
|
||||
case(status)
|
||||
when 'IGNORE' then results[:ignores] << line_out
|
||||
when 'FAIL' then results[:failures] << line_out
|
||||
|
||||
Reference in New Issue
Block a user