INNER CODE UNIT · Python

ProcessFile

sweeneychris/TheiaSfM · libraries/gtest/scripts/fuse_gtest_files.py:183

  def ProcessFile(gtest_source_file):
    """Processes the given gtest source file."""

    # We don't process the same #included file twice.
    if gtest_source_file in processed_files:
      return

    processed_files.add(gtest_source_file)

    # Reads each line in the given gtest source file.
    for line in open(os.path.join(gtest_root, gtest_source_file), 'r'):
      m = INCLUDE_GTEST_FILE_REGEX.match(line)
      if m:
        if 'include/' + m.group(1) == GTEST_SPI_H_SEED:
          # It's '#include "gtest/gtest-spi.h"'.  This file is not
          # #included by "gtest/gtest.h", so we need to process it.
          ProcessFile(GTEST_SPI_H_SEED)
        else:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…