Processes the given gtest header file.
(gtest_header_path)
| 150 | processed_files = sets.Set() # Holds all gtest headers we've processed. |
| 151 | |
| 152 | def ProcessFile(gtest_header_path): |
| 153 | """Processes the given gtest header file.""" |
| 154 | |
| 155 | # We don't process the same header twice. |
| 156 | if gtest_header_path in processed_files: |
| 157 | return |
| 158 | |
| 159 | processed_files.add(gtest_header_path) |
| 160 | |
| 161 | # Reads each line in the given gtest header. |
| 162 | for line in file(os.path.join(gtest_root, gtest_header_path), 'r'): |
| 163 | m = INCLUDE_GTEST_FILE_REGEX.match(line) |
| 164 | if m: |
| 165 | # It's '#include "gtest/..."' - let's process it recursively. |
| 166 | ProcessFile('include/' + m.group(1)) |
| 167 | else: |
| 168 | # Otherwise we copy the line unchanged to the output file. |
| 169 | output_file.write(line) |
| 170 | |
| 171 | ProcessFile(GTEST_H_SEED) |
| 172 | output_file.close() |
no test coverage detected