MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / ProcessFile

Function ProcessFile

tests/external/gmock-1.7.0/gtest/scripts/fuse_gtest_files.py:152–169  ·  view source on GitHub ↗

Processes the given gtest header file.

(gtest_header_path)

Source from the content-addressed store, hash-verified

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()

Callers 2

FuseGTestHFunction · 0.70
FuseGTestAllCcToFileFunction · 0.70

Calls 3

fileFunction · 0.50
addMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected