- fixed summarizer to handle more generic input

- ignore comments in test parser
- fixed a couple bugs in 16-bit support
- fixed minor compiler errors for less lenient compilers
- fixed error in docs.
- renamed link to link_it in rakefiles to avoid collision in new versions of rake

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@136 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
mvandervoord
2011-10-11 02:40:04 +00:00
parent 152e78a4a8
commit 3a82e1eeab
9 changed files with 38 additions and 14 deletions
+11 -6
View File
@@ -111,12 +111,17 @@ class UnityTestRunnerGenerator
def find_includes(input_file)
input_file.rewind
includes = []
input_file.readlines.each do |line|
scan_results = line.scan(/^\s*#include\s+\"\s*(.+)\.[hH]\s*\"/)
includes << scan_results[0][0] if (scan_results.size > 0)
end
return includes
#read in file
source = input_file.read
#remove comments (block and line, in three steps to ensure correct precedence)
source.gsub!(/\/\/(?:.+\/\*|\*(?:$|[^\/])).*$/, '') # remove line comments that comment out the start of blocks
source.gsub!(/\/\*.*?\*\//m, '') # remove block comments
source.gsub!(/\/\/.*$/, '') # remove line comments (all that remain)
#parse out includes
return source.scan(/^\s*#include\s+\"\s*(.+)\.[hH]\s*\"/).flatten
end
def find_mocks(includes)