summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-14 05:35:59 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-14 05:35:59 +0000
commit2620c79810d4741922e9fa89050c0af564994f24 (patch)
tree153342e638fc52dae7800c9de65ab4576cf52b26 /scripts
parentb15c73341d7a7abff7a04e1de18de59ba0f34009 (diff)
downloadgtest-2620c79810d4741922e9fa89050c0af564994f24.tar.gz
gtest-2620c79810d4741922e9fa89050c0af564994f24.tar.bz2
gtest-2620c79810d4741922e9fa89050c0af564994f24.tar.xz
Include gtest headers as user headers instead of system headers.
git-svn-id: http://googletest.googlecode.com/svn/trunk@482 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fuse_gtest_files.py18
-rwxr-xr-xscripts/gen_gtest_pred_impl.py4
2 files changed, 11 insertions, 11 deletions
diff --git a/scripts/fuse_gtest_files.py b/scripts/fuse_gtest_files.py
index 148444c..57ef72f 100755
--- a/scripts/fuse_gtest_files.py
+++ b/scripts/fuse_gtest_files.py
@@ -67,8 +67,8 @@ import sys
# Test root directory.
DEFAULT_GTEST_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
-# Regex for matching '#include <gtest/...>'.
-INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*<(gtest/.+)>')
+# Regex for matching '#include "gtest/..."'.
+INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(gtest/.+)"')
# Regex for matching '#include "src/..."'.
INCLUDE_SRC_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(src/.+)"')
@@ -162,7 +162,7 @@ def FuseGTestH(gtest_root, output_dir):
for line in file(os.path.join(gtest_root, gtest_header_path), 'r'):
m = INCLUDE_GTEST_FILE_REGEX.match(line)
if m:
- # It's '#include <gtest/...>' - let's process it recursively.
+ # It's '#include "gtest/..."' - let's process it recursively.
ProcessFile('include/' + m.group(1))
else:
# Otherwise we copy the line unchanged to the output file.
@@ -191,19 +191,19 @@ def FuseGTestAllCcToFile(gtest_root, output_file):
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.
+ # 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:
- # It's '#include <gtest/foo.h>' where foo is not gtest-spi.
- # We treat it as '#include <gtest/gtest.h>', as all other
+ # It's '#include "gtest/foo.h"' where foo is not gtest-spi.
+ # We treat it as '#include "gtest/gtest.h"', as all other
# gtest headers are being fused into gtest.h and cannot be
# #included directly.
- # There is no need to #include <gtest/gtest.h> more than once.
+ # There is no need to #include "gtest/gtest.h" more than once.
if not GTEST_H_SEED in processed_files:
processed_files.add(GTEST_H_SEED)
- output_file.write('#include <%s>\n' % (GTEST_H_OUTPUT,))
+ output_file.write('#include "%s"\n' % (GTEST_H_OUTPUT,))
else:
m = INCLUDE_SRC_FILE_REGEX.match(line)
if m:
diff --git a/scripts/gen_gtest_pred_impl.py b/scripts/gen_gtest_pred_impl.py
index 8307134..39bb6cf 100755
--- a/scripts/gen_gtest_pred_impl.py
+++ b/scripts/gen_gtest_pred_impl.py
@@ -386,8 +386,8 @@ def UnitTestPreamble():
#include <iostream>
-#include <gtest/gtest.h>
-#include <gtest/gtest-spi.h>
+#include "gtest/gtest.h"
+#include "gtest/gtest-spi.h"
// A user-defined data type.
struct Bool {