Include gtest headers as user headers instead of system headers.

This commit is contained in:
zhanyong.wan 2010-09-14 05:35:59 +00:00
parent 88e0df6247
commit dac3e879c5
87 changed files with 165 additions and 165 deletions

2
README
View File

@ -262,7 +262,7 @@ and all features using tuple will be disabled.
### Multi-threaded Tests ### ### Multi-threaded Tests ###
Google Test is thread-safe where the pthread library is available. Google Test is thread-safe where the pthread library is available.
After #include <gtest/gtest.h>, you can check the GTEST_IS_THREADSAFE After #include "gtest/gtest.h", you can check the GTEST_IS_THREADSAFE
macro to see whether this is the case (yes if the macro is #defined to macro to see whether this is the case (yes if the macro is #defined to
1, no if it's undefined.). 1, no if it's undefined.).

View File

@ -38,7 +38,7 @@
#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ #ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ #define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
#include <gtest/internal/gtest-death-test-internal.h> #include "gtest/internal/gtest-death-test-internal.h"
namespace testing { namespace testing {

View File

@ -48,8 +48,8 @@
#include <limits> #include <limits>
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
#include <gtest/internal/gtest-internal.h> #include "gtest/internal/gtest-internal.h"
namespace testing { namespace testing {

View File

@ -149,7 +149,7 @@ INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
#endif // 0 #endif // 0
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#if !GTEST_OS_SYMBIAN #if !GTEST_OS_SYMBIAN
#include <utility> #include <utility>
@ -158,9 +158,9 @@ INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
// scripts/fuse_gtest.py depends on gtest's own header being #included // scripts/fuse_gtest.py depends on gtest's own header being #included
// *unconditionally*. Therefore these #includes cannot be moved // *unconditionally*. Therefore these #includes cannot be moved
// inside #if GTEST_HAS_PARAM_TEST. // inside #if GTEST_HAS_PARAM_TEST.
#include <gtest/internal/gtest-internal.h> #include "gtest/internal/gtest-internal.h"
#include <gtest/internal/gtest-param-util.h> #include "gtest/internal/gtest-param-util.h"
#include <gtest/internal/gtest-param-util-generated.h> #include "gtest/internal/gtest-param-util-generated.h"
#if GTEST_HAS_PARAM_TEST #if GTEST_HAS_PARAM_TEST

View File

@ -147,7 +147,7 @@ INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
#endif // 0 #endif // 0
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#if !GTEST_OS_SYMBIAN #if !GTEST_OS_SYMBIAN
#include <utility> #include <utility>
@ -156,9 +156,9 @@ INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
// scripts/fuse_gtest.py depends on gtest's own header being #included // scripts/fuse_gtest.py depends on gtest's own header being #included
// *unconditionally*. Therefore these #includes cannot be moved // *unconditionally*. Therefore these #includes cannot be moved
// inside #if GTEST_HAS_PARAM_TEST. // inside #if GTEST_HAS_PARAM_TEST.
#include <gtest/internal/gtest-internal.h> #include "gtest/internal/gtest-internal.h"
#include <gtest/internal/gtest-param-util.h> #include "gtest/internal/gtest-param-util.h"
#include <gtest/internal/gtest-param-util-generated.h> #include "gtest/internal/gtest-param-util-generated.h"
#if GTEST_HAS_PARAM_TEST #if GTEST_HAS_PARAM_TEST

View File

@ -100,8 +100,8 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#include <gtest/internal/gtest-internal.h> #include "gtest/internal/gtest-internal.h"
namespace testing { namespace testing {

View File

@ -35,7 +35,7 @@
#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_ #ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_
#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_ #define GTEST_INCLUDE_GTEST_GTEST_SPI_H_
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace testing { namespace testing {

View File

@ -35,8 +35,8 @@
#include <iosfwd> #include <iosfwd>
#include <vector> #include <vector>
#include <gtest/internal/gtest-internal.h> #include "gtest/internal/gtest-internal.h"
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
namespace testing { namespace testing {

View File

@ -146,8 +146,8 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
#endif // 0 #endif // 0
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#include <gtest/internal/gtest-type-util.h> #include "gtest/internal/gtest-type-util.h"
// Implements typed tests. // Implements typed tests.

View File

@ -54,15 +54,15 @@
#include <limits> #include <limits>
#include <vector> #include <vector>
#include <gtest/internal/gtest-internal.h> #include "gtest/internal/gtest-internal.h"
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
#include <gtest/gtest-death-test.h> #include "gtest/gtest-death-test.h"
#include <gtest/gtest-message.h> #include "gtest/gtest-message.h"
#include <gtest/gtest-param-test.h> #include "gtest/gtest-param-test.h"
#include <gtest/gtest-printers.h> #include "gtest/gtest-printers.h"
#include <gtest/gtest_prod.h> #include "gtest/gtest_prod.h"
#include <gtest/gtest-test-part.h> #include "gtest/gtest-test-part.h"
#include <gtest/gtest-typed-test.h> #include "gtest/gtest-typed-test.h"
// Depending on the platform, different string classes are available. // Depending on the platform, different string classes are available.
// On Linux, in addition to ::std::string, Google also makes use of // On Linux, in addition to ::std::string, Google also makes use of
@ -1736,7 +1736,7 @@ const T* TestWithParam<T>::parameter_ = NULL;
// Includes the auto-generated header that implements a family of // Includes the auto-generated header that implements a family of
// generic predicate assertion macros. // generic predicate assertion macros.
#include <gtest/gtest_pred_impl.h> #include "gtest/gtest_pred_impl.h"
// Macros for testing equalities and inequalities. // Macros for testing equalities and inequalities.
// //

View File

@ -37,7 +37,7 @@
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
#include <gtest/internal/gtest-internal.h> #include "gtest/internal/gtest-internal.h"
namespace testing { namespace testing {
namespace internal { namespace internal {

View File

@ -40,7 +40,7 @@
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
namespace testing { namespace testing {
namespace internal { namespace internal {

View File

@ -37,7 +37,7 @@
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#if GTEST_OS_LINUX #if GTEST_OS_LINUX
#include <stdlib.h> #include <stdlib.h>
@ -52,9 +52,9 @@
#include <limits> #include <limits>
#include <set> #include <set>
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
#include <gtest/internal/gtest-filepath.h> #include "gtest/internal/gtest-filepath.h"
#include <gtest/internal/gtest-type-util.h> #include "gtest/internal/gtest-type-util.h"
// Due to C++ preprocessor weirdness, we need double indirection to // Due to C++ preprocessor weirdness, we need double indirection to
// concatenate two tokens when one of them is __LINE__. Writing // concatenate two tokens when one of them is __LINE__. Writing

View File

@ -71,7 +71,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
namespace testing { namespace testing {
namespace internal { namespace internal {

View File

@ -47,8 +47,8 @@
// scripts/fuse_gtest.py depends on gtest's own header being #included // scripts/fuse_gtest.py depends on gtest's own header being #included
// *unconditionally*. Therefore these #includes cannot be moved // *unconditionally*. Therefore these #includes cannot be moved
// inside #if GTEST_HAS_PARAM_TEST. // inside #if GTEST_HAS_PARAM_TEST.
#include <gtest/internal/gtest-param-util.h> #include "gtest/internal/gtest-param-util.h"
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#if GTEST_HAS_PARAM_TEST #if GTEST_HAS_PARAM_TEST

View File

@ -48,8 +48,8 @@ $var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
// scripts/fuse_gtest.py depends on gtest's own header being #included // scripts/fuse_gtest.py depends on gtest's own header being #included
// *unconditionally*. Therefore these #includes cannot be moved // *unconditionally*. Therefore these #includes cannot be moved
// inside #if GTEST_HAS_PARAM_TEST. // inside #if GTEST_HAS_PARAM_TEST.
#include <gtest/internal/gtest-param-util.h> #include "gtest/internal/gtest-param-util.h"
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#if GTEST_HAS_PARAM_TEST #if GTEST_HAS_PARAM_TEST

View File

@ -41,10 +41,10 @@
// scripts/fuse_gtest.py depends on gtest's own header being #included // scripts/fuse_gtest.py depends on gtest's own header being #included
// *unconditionally*. Therefore these #includes cannot be moved // *unconditionally*. Therefore these #includes cannot be moved
// inside #if GTEST_HAS_PARAM_TEST. // inside #if GTEST_HAS_PARAM_TEST.
#include <gtest/internal/gtest-internal.h> #include "gtest/internal/gtest-internal.h"
#include <gtest/internal/gtest-linked_ptr.h> #include "gtest/internal/gtest-linked_ptr.h"
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#include <gtest/gtest-printers.h> #include "gtest/gtest-printers.h"
#if GTEST_HAS_PARAM_TEST #if GTEST_HAS_PARAM_TEST

View File

@ -441,7 +441,7 @@
#if GTEST_HAS_TR1_TUPLE #if GTEST_HAS_TR1_TUPLE
#if GTEST_USE_OWN_TR1_TUPLE #if GTEST_USE_OWN_TR1_TUPLE
#include <gtest/internal/gtest-tuple.h> #include "gtest/internal/gtest-tuple.h"
#elif GTEST_OS_SYMBIAN #elif GTEST_OS_SYMBIAN
// On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to // On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to

View File

@ -47,7 +47,7 @@
#endif #endif
#include <string.h> #include <string.h>
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#include <string> #include <string>

View File

@ -44,8 +44,8 @@
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P

View File

@ -42,8 +42,8 @@ $var n = 50 $$ Maximum length of type lists we want to support.
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P

View File

@ -34,7 +34,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <gtest/gtest.h> #include "gtest/gtest.h"
using ::testing::EmptyTestEventListener; using ::testing::EmptyTestEventListener;
using ::testing::InitGoogleTest; using ::testing::InitGoogleTest;

View File

@ -45,7 +45,7 @@
#include <limits.h> #include <limits.h>
#include "sample1.h" #include "sample1.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
// Step 2. Use the TEST macro to define your tests. // Step 2. Use the TEST macro to define your tests.

View File

@ -41,7 +41,7 @@
// needed. // needed.
#include "sample2.h" #include "sample2.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
// In this example, we test the MyString class (a simple string). // In this example, we test the MyString class (a simple string).

View File

@ -64,7 +64,7 @@
// </TechnicalDetails> // </TechnicalDetails>
#include "sample3-inl.h" #include "sample3-inl.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
// To use a test fixture, derive a class from testing::Test. // To use a test fixture, derive a class from testing::Test.
class QueueTest : public testing::Test { class QueueTest : public testing::Test {

View File

@ -29,7 +29,7 @@
// //
// Author: wan@google.com (Zhanyong Wan) // Author: wan@google.com (Zhanyong Wan)
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include "sample4.h" #include "sample4.h"
// Tests the Increment() method. // Tests the Increment() method.

View File

@ -47,7 +47,7 @@
#include <limits.h> #include <limits.h>
#include <time.h> #include <time.h>
#include "sample3-inl.h" #include "sample3-inl.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include "sample1.h" #include "sample1.h"
// In this sample, we want to ensure that every test finishes within // In this sample, we want to ensure that every test finishes within

View File

@ -35,7 +35,7 @@
// The interface and its implementations are in this header. // The interface and its implementations are in this header.
#include "prime_tables.h" #include "prime_tables.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
// First, we define some factory functions for creating instances of // First, we define some factory functions for creating instances of
// the implementations. You may be able to skip this step if all your // the implementations. You may be able to skip this step if all your

View File

@ -38,7 +38,7 @@
// The interface and its implementations are in this header. // The interface and its implementations are in this header.
#include "prime_tables.h" #include "prime_tables.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
#if GTEST_HAS_PARAM_TEST #if GTEST_HAS_PARAM_TEST

View File

@ -36,7 +36,7 @@
// Use class definitions to test from this header. // Use class definitions to test from this header.
#include "prime_tables.h" #include "prime_tables.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
#if GTEST_HAS_COMBINE #if GTEST_HAS_COMBINE

View File

@ -34,7 +34,7 @@
#include <stdio.h> #include <stdio.h>
#include <gtest/gtest.h> #include "gtest/gtest.h"
using ::testing::EmptyTestEventListener; using ::testing::EmptyTestEventListener;
using ::testing::InitGoogleTest; using ::testing::InitGoogleTest;

View File

@ -67,8 +67,8 @@ import sys
# Test root directory. # Test root directory.
DEFAULT_GTEST_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..') DEFAULT_GTEST_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
# Regex for matching '#include <gtest/...>'. # Regex for matching '#include "gtest/..."'.
INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*<(gtest/.+)>') INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(gtest/.+)"')
# Regex for matching '#include "src/..."'. # Regex for matching '#include "src/..."'.
INCLUDE_SRC_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(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'): for line in file(os.path.join(gtest_root, gtest_header_path), 'r'):
m = INCLUDE_GTEST_FILE_REGEX.match(line) m = INCLUDE_GTEST_FILE_REGEX.match(line)
if m: 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)) ProcessFile('include/' + m.group(1))
else: else:
# Otherwise we copy the line unchanged to the output file. # 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) m = INCLUDE_GTEST_FILE_REGEX.match(line)
if m: if m:
if 'include/' + m.group(1) == GTEST_SPI_H_SEED: if 'include/' + m.group(1) == GTEST_SPI_H_SEED:
# It's '#include <gtest/gtest-spi.h>'. This file is not # It's '#include "gtest/gtest-spi.h"'. This file is not
# #included by <gtest/gtest.h>, so we need to process it. # #included by "gtest/gtest.h", so we need to process it.
ProcessFile(GTEST_SPI_H_SEED) ProcessFile(GTEST_SPI_H_SEED)
else: else:
# It's '#include <gtest/foo.h>' where foo is not gtest-spi. # It's '#include "gtest/foo.h"' where foo is not gtest-spi.
# We treat it as '#include <gtest/gtest.h>', as all other # We treat it as '#include "gtest/gtest.h"', as all other
# gtest headers are being fused into gtest.h and cannot be # gtest headers are being fused into gtest.h and cannot be
# #included directly. # #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: if not GTEST_H_SEED in processed_files:
processed_files.add(GTEST_H_SEED) 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: else:
m = INCLUDE_SRC_FILE_REGEX.match(line) m = INCLUDE_SRC_FILE_REGEX.match(line)
if m: if m:

View File

@ -386,8 +386,8 @@ def UnitTestPreamble():
#include <iostream> #include <iostream>
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <gtest/gtest-spi.h> #include "gtest/gtest-spi.h"
// A user-defined data type. // A user-defined data type.
struct Bool { struct Bool {

View File

@ -36,7 +36,7 @@
// This line ensures that gtest.h can be compiled on its own, even // This line ensures that gtest.h can be compiled on its own, even
// when it's fused. // when it's fused.
#include <gtest/gtest.h> #include "gtest/gtest.h"
// The following lines pull in the real gtest *.cc files. // The following lines pull in the real gtest *.cc files.
#include "src/gtest.cc" #include "src/gtest.cc"

View File

@ -31,8 +31,8 @@
// //
// This file implements death tests. // This file implements death tests.
#include <gtest/gtest-death-test.h> #include "gtest/gtest-death-test.h"
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#if GTEST_HAS_DEATH_TEST #if GTEST_HAS_DEATH_TEST
@ -54,8 +54,8 @@
#endif // GTEST_HAS_DEATH_TEST #endif // GTEST_HAS_DEATH_TEST
#include <gtest/gtest-message.h> #include "gtest/gtest-message.h"
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -29,8 +29,8 @@
// //
// Authors: keith.ray@gmail.com (Keith Ray) // Authors: keith.ray@gmail.com (Keith Ray)
#include <gtest/internal/gtest-filepath.h> #include "gtest/internal/gtest-filepath.h"
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#include <stdlib.h> #include <stdlib.h>
@ -57,7 +57,7 @@
#define GTEST_PATH_MAX_ _POSIX_PATH_MAX #define GTEST_PATH_MAX_ _POSIX_PATH_MAX
#endif // GTEST_OS_WINDOWS #endif // GTEST_OS_WINDOWS
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
namespace testing { namespace testing {
namespace internal { namespace internal {

View File

@ -56,14 +56,14 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#if GTEST_OS_WINDOWS #if GTEST_OS_WINDOWS
#include <windows.h> // For DWORD. #include <windows.h> // For DWORD.
#endif // GTEST_OS_WINDOWS #endif // GTEST_OS_WINDOWS
#include <gtest/gtest.h> // NOLINT #include "gtest/gtest.h" // NOLINT
#include <gtest/gtest-spi.h> #include "gtest/gtest-spi.h"
namespace testing { namespace testing {

View File

@ -29,7 +29,7 @@
// //
// Author: wan@google.com (Zhanyong Wan) // Author: wan@google.com (Zhanyong Wan)
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#include <limits.h> #include <limits.h>
#include <stdlib.h> #include <stdlib.h>
@ -51,9 +51,9 @@
#include <mach/vm_map.h> #include <mach/vm_map.h>
#endif // GTEST_OS_MAC #endif // GTEST_OS_MAC
#include <gtest/gtest-spi.h> #include "gtest/gtest-spi.h"
#include <gtest/gtest-message.h> #include "gtest/gtest-message.h"
#include <gtest/internal/gtest-string.h> #include "gtest/internal/gtest-string.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -42,12 +42,12 @@
// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that // or void PrintTo(const Foo&, ::std::ostream*) in the namespace that
// defines Foo. // defines Foo.
#include <gtest/gtest-printers.h> #include "gtest/gtest-printers.h"
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <ostream> // NOLINT #include <ostream> // NOLINT
#include <string> #include <string>
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
namespace testing { namespace testing {

View File

@ -31,7 +31,7 @@
// //
// The Google C++ Testing Framework (Google Test) // The Google C++ Testing Framework (Google Test)
#include <gtest/gtest-test-part.h> #include "gtest/gtest-test-part.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -29,8 +29,8 @@
// //
// Author: wan@google.com (Zhanyong Wan) // Author: wan@google.com (Zhanyong Wan)
#include <gtest/gtest-typed-test.h> #include "gtest/gtest-typed-test.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace testing { namespace testing {
namespace internal { namespace internal {

View File

@ -31,8 +31,8 @@
// //
// The Google C++ Testing Framework (Google Test) // The Google C++ Testing Framework (Google Test)
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <gtest/gtest-spi.h> #include "gtest/gtest-spi.h"
#include <ctype.h> #include <ctype.h>
#include <math.h> #include <math.h>

View File

@ -29,7 +29,7 @@
#include <iostream> #include <iostream>
#include <gtest/gtest.h> #include "gtest/gtest.h"
GTEST_API_ int main(int argc, char **argv) { GTEST_API_ int main(int argc, char **argv) {
std::cout << "Running main() from gtest_main.cc\n"; std::cout << "Running main() from gtest_main.cc\n";

View File

@ -31,9 +31,9 @@
// //
// Tests for death tests. // Tests for death tests.
#include <gtest/gtest-death-test.h> #include "gtest/gtest-death-test.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <gtest/internal/gtest-filepath.h> #include "gtest/internal/gtest-filepath.h"
using testing::internal::AlwaysFalse; using testing::internal::AlwaysFalse;
using testing::internal::AlwaysTrue; using testing::internal::AlwaysTrue;
@ -52,7 +52,7 @@ using testing::internal::AlwaysTrue;
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
#include <gtest/gtest-spi.h> #include "gtest/gtest-spi.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -38,8 +38,8 @@
// build or make-files for some existing Google Test clients. Do not // build or make-files for some existing Google Test clients. Do not
// #include this file anywhere else! // #include this file anywhere else!
#include <gtest/internal/gtest-filepath.h> #include "gtest/internal/gtest-filepath.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -30,10 +30,10 @@
// Authors: Dan Egnor (egnor@google.com) // Authors: Dan Egnor (egnor@google.com)
// Ported to Windows: Vadim Berman (vadimb@google.com) // Ported to Windows: Vadim Berman (vadimb@google.com)
#include <gtest/internal/gtest-linked_ptr.h> #include "gtest/internal/gtest-linked_ptr.h"
#include <stdlib.h> #include <stdlib.h>
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace { namespace {

View File

@ -33,7 +33,7 @@
// This file verifies Google Test event listeners receive events at the // This file verifies Google Test event listeners receive events at the
// right times. // right times.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <vector> #include <vector>
using ::testing::AddGlobalTestEnvironment; using ::testing::AddGlobalTestEnvironment;

View File

@ -31,9 +31,9 @@
// //
// Tests for the Message class. // Tests for the Message class.
#include <gtest/gtest-message.h> #include "gtest/gtest-message.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace { namespace {

View File

@ -38,7 +38,7 @@
// make-files on Windows and other platforms. Do not #include this file // make-files on Windows and other platforms. Do not #include this file
// anywhere else! // anywhere else!
#include <gtest/gtest.h> #include "gtest/gtest.h"
#if GTEST_OS_WINDOWS_MOBILE #if GTEST_OS_WINDOWS_MOBILE
#include <windows.h> #include <windows.h>

View File

@ -32,7 +32,7 @@
// Tests for Google Test itself. This verifies that the basic constructs of // Tests for Google Test itself. This verifies that the basic constructs of
// Google Test work. // Google Test work.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include "test/gtest-param-test_test.h" #include "test/gtest-param-test_test.h"

View File

@ -33,7 +33,7 @@
// generators objects produce correct parameter sequences and that // generators objects produce correct parameter sequences and that
// Google Test runtime instantiates correct tests from those sequences. // Google Test runtime instantiates correct tests from those sequences.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#if GTEST_HAS_PARAM_TEST #if GTEST_HAS_PARAM_TEST

View File

@ -37,7 +37,7 @@
#ifndef GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ #ifndef GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
#define GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ #define GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
#include <gtest/gtest.h> #include "gtest/gtest.h"
#if GTEST_HAS_PARAM_TEST #if GTEST_HAS_PARAM_TEST

View File

@ -31,7 +31,7 @@
// //
// This file tests the internal cross-platform support utilities. // This file tests the internal cross-platform support utilities.
#include <gtest/internal/gtest-port.h> #include "gtest/internal/gtest-port.h"
#include <stdio.h> #include <stdio.h>
@ -41,8 +41,8 @@
#include <utility> // For std::pair and std::make_pair. #include <utility> // For std::pair and std::make_pair.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <gtest/gtest-spi.h> #include "gtest/gtest-spi.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -33,7 +33,7 @@
// //
// This file tests the universal value printer. // This file tests the universal value printer.
#include <gtest/gtest-printers.h> #include "gtest/gtest-printers.h"
#include <ctype.h> #include <ctype.h>
#include <limits.h> #include <limits.h>
@ -48,7 +48,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <gtest/gtest.h> #include "gtest/gtest.h"
// hash_map and hash_set are available on Windows. // hash_map and hash_set are available on Windows.
#if GTEST_OS_WINDOWS #if GTEST_OS_WINDOWS

View File

@ -30,9 +30,9 @@
// Author: mheule@google.com (Markus Heule) // Author: mheule@google.com (Markus Heule)
// //
#include <gtest/gtest-test-part.h> #include "gtest/gtest-test-part.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
using testing::Message; using testing::Message;
using testing::Test; using testing::Test;

View File

@ -29,9 +29,9 @@
// //
// Author: wan@google.com (Zhanyong Wan) // Author: wan@google.com (Zhanyong Wan)
#include <gtest/internal/gtest-tuple.h> #include "gtest/internal/gtest-tuple.h"
#include <utility> #include <utility>
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace { namespace {

View File

@ -32,7 +32,7 @@
#include <vector> #include <vector>
#include "test/gtest-typed-test_test.h" #include "test/gtest-typed-test_test.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
#if GTEST_HAS_TYPED_TEST_P #if GTEST_HAS_TYPED_TEST_P

View File

@ -33,7 +33,7 @@
#include <vector> #include <vector>
#include "test/gtest-typed-test_test.h" #include "test/gtest-typed-test_test.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
using testing::Test; using testing::Test;

View File

@ -32,7 +32,7 @@
#ifndef GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ #ifndef GTEST_TEST_GTEST_TYPED_TEST_TEST_H_
#define GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ #define GTEST_TEST_GTEST_TYPED_TEST_TEST_H_
#include <gtest/gtest.h> #include "gtest/gtest.h"
#if GTEST_HAS_TYPED_TEST_P #if GTEST_HAS_TYPED_TEST_P

View File

@ -33,7 +33,7 @@
// This file contains tests verifying correctness of data provided via // This file contains tests verifying correctness of data provided via
// UnitTest's public methods. // UnitTest's public methods.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <string.h> // For strcmp. #include <string.h> // For strcmp.
#include <algorithm> #include <algorithm>

View File

@ -39,7 +39,7 @@
// This program will be invoked from a Python unit test. It is // This program will be invoked from a Python unit test. It is
// expected to fail. Don't run it directly. // expected to fail. Don't run it directly.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#if GTEST_OS_WINDOWS #if GTEST_OS_WINDOWS
#include <windows.h> #include <windows.h>

View File

@ -32,7 +32,7 @@
// Tests for Google Test itself. Tests in this file throw C++ or SEH // Tests for Google Test itself. Tests in this file throw C++ or SEH
// exceptions, and the output is verified by gtest_catch_exceptions_test.py. // exceptions, and the output is verified by gtest_catch_exceptions_test.py.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <stdio.h> // NOLINT #include <stdio.h> // NOLINT
#include <stdlib.h> // For exit(). #include <stdlib.h> // For exit().

View File

@ -35,7 +35,7 @@
#include <stdio.h> #include <stdio.h>
#include <gtest/gtest.h> #include "gtest/gtest.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -32,7 +32,7 @@
// A helper program for testing that Google Test parses the environment // A helper program for testing that Google Test parses the environment
// variables correctly. // variables correctly.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <iostream> #include <iostream>

View File

@ -33,7 +33,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <gtest/gtest.h> #include "gtest/gtest.h"
#define GTEST_IMPLEMENTATION_ 1 // Required for the next #include. #define GTEST_IMPLEMENTATION_ 1 // Required for the next #include.
#include "src/gtest-internal-inl.h" #include "src/gtest-internal-inl.h"

View File

@ -38,7 +38,7 @@
// The program will be invoked from a Python unit test. Don't run it // The program will be invoked from a Python unit test. Don't run it
// directly. // directly.
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace { namespace {

View File

@ -32,7 +32,7 @@
// This program is meant to be run by gtest_help_test.py. Do not run // This program is meant to be run by gtest_help_test.py. Do not run
// it directly. // it directly.
#include <gtest/gtest.h> #include "gtest/gtest.h"
// When a help flag is specified, this program should skip the tests // When a help flag is specified, this program should skip the tests
// and exit with 0; otherwise the following test will be executed, // and exit with 0; otherwise the following test will be executed,

View File

@ -38,7 +38,7 @@
// This program will be invoked from a Python unit test. // This program will be invoked from a Python unit test.
// Don't run it directly. // Don't run it directly.
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace { namespace {

View File

@ -29,7 +29,7 @@
// //
// Author: wan@google.com (Zhanyong Wan) // Author: wan@google.com (Zhanyong Wan)
#include <gtest/gtest.h> #include "gtest/gtest.h"
// Tests that we don't have to define main() when we link to // Tests that we don't have to define main() when we link to
// gtest_main instead of gtest. // gtest_main instead of gtest.

View File

@ -42,7 +42,7 @@
#ifdef TEST_CANNOT_IGNORE_RUN_ALL_TESTS_RESULT #ifdef TEST_CANNOT_IGNORE_RUN_ALL_TESTS_RESULT
// Tests that the result of RUN_ALL_TESTS() cannot be ignored. // Tests that the result of RUN_ALL_TESTS() cannot be ignored.
#include <gtest/gtest.h> #include "gtest/gtest.h"
int main(int argc, char** argv) { int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
@ -58,7 +58,7 @@ int main(int argc, char** argv) {
// Tests that the compiler catches the typo when a user declares a // Tests that the compiler catches the typo when a user declares a
// Setup() method in a test fixture. // Setup() method in a test fixture.
#include <gtest/gtest.h> #include "gtest/gtest.h"
class MyTest : public testing::Test { class MyTest : public testing::Test {
protected: protected:
@ -69,7 +69,7 @@ class MyTest : public testing::Test {
// Tests that the compiler catches the typo when a user calls Setup() // Tests that the compiler catches the typo when a user calls Setup()
// from a test fixture. // from a test fixture.
#include <gtest/gtest.h> #include "gtest/gtest.h"
class MyTest : public testing::Test { class MyTest : public testing::Test {
protected: protected:
@ -82,7 +82,7 @@ class MyTest : public testing::Test {
// Tests that the compiler catches the typo when a user declares a // Tests that the compiler catches the typo when a user declares a
// Setup() method in a subclass of Environment. // Setup() method in a subclass of Environment.
#include <gtest/gtest.h> #include "gtest/gtest.h"
class MyEnvironment : public testing::Environment { class MyEnvironment : public testing::Environment {
public: public:
@ -93,7 +93,7 @@ class MyEnvironment : public testing::Environment {
// Tests that the compiler catches the typo when a user calls Setup() // Tests that the compiler catches the typo when a user calls Setup()
// in an Environment. // in an Environment.
#include <gtest/gtest.h> #include "gtest/gtest.h"
class MyEnvironment : public testing::Environment { class MyEnvironment : public testing::Environment {
protected: protected:
@ -107,7 +107,7 @@ class MyEnvironment : public testing::Environment {
// Tests that the compiler catches using the wrong test case name in // Tests that the compiler catches using the wrong test case name in
// TYPED_TEST_P. // TYPED_TEST_P.
#include <gtest/gtest.h> #include "gtest/gtest.h"
template <typename T> template <typename T>
class FooTest : public testing::Test { class FooTest : public testing::Test {
@ -126,7 +126,7 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types<int>);
// Tests that the compiler catches using the wrong test case name in // Tests that the compiler catches using the wrong test case name in
// REGISTER_TYPED_TEST_CASE_P. // REGISTER_TYPED_TEST_CASE_P.
#include <gtest/gtest.h> #include "gtest/gtest.h"
template <typename T> template <typename T>
class FooTest : public testing::Test { class FooTest : public testing::Test {
@ -145,7 +145,7 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types<int>);
// Tests that the compiler catches using the wrong test case name in // Tests that the compiler catches using the wrong test case name in
// INSTANTIATE_TYPED_TEST_CASE_P. // INSTANTIATE_TYPED_TEST_CASE_P.
#include <gtest/gtest.h> #include "gtest/gtest.h"
template <typename T> template <typename T>
class FooTest : public testing::Test { class FooTest : public testing::Test {
@ -166,7 +166,7 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, BarTest, testing::Types<int>);
// Tests that the compiler catches instantiating TYPED_TEST_CASE_P // Tests that the compiler catches instantiating TYPED_TEST_CASE_P
// twice with the same name prefix. // twice with the same name prefix.
#include <gtest/gtest.h> #include "gtest/gtest.h"
template <typename T> template <typename T>
class FooTest : public testing::Test { class FooTest : public testing::Test {
@ -183,21 +183,21 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types<double>);
#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_IS_NOT_A_TYPE) #elif defined(TEST_STATIC_ASSERT_TYPE_EQ_IS_NOT_A_TYPE)
#include <gtest/gtest.h> #include "gtest/gtest.h"
// Tests that StaticAssertTypeEq<T1, T2> cannot be used as a type. // Tests that StaticAssertTypeEq<T1, T2> cannot be used as a type.
testing::StaticAssertTypeEq<int, int> dummy; testing::StaticAssertTypeEq<int, int> dummy;
#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_NAMESPACE) #elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_NAMESPACE)
#include <gtest/gtest.h> #include "gtest/gtest.h"
// Tests that StaticAssertTypeEq<T1, T2> works in a namespace scope. // Tests that StaticAssertTypeEq<T1, T2> works in a namespace scope.
static bool dummy = testing::StaticAssertTypeEq<int, const int>(); static bool dummy = testing::StaticAssertTypeEq<int, const int>();
#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_CLASS) #elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_CLASS)
#include <gtest/gtest.h> #include "gtest/gtest.h"
template <typename T> template <typename T>
class Helper { class Helper {
@ -215,7 +215,7 @@ void Test() {
#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_FUNCTION) #elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_FUNCTION)
#include <gtest/gtest.h> #include "gtest/gtest.h"
void Test() { void Test() {
// Tests that StaticAssertTypeEq<T1, T2> works inside a function. // Tests that StaticAssertTypeEq<T1, T2> works inside a function.
@ -225,7 +225,7 @@ void Test() {
#else #else
// A sanity test. This should compile. // A sanity test. This should compile.
#include <gtest/gtest.h> #include "gtest/gtest.h"
int main() { int main() {
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();

View File

@ -32,7 +32,7 @@
// //
// Author: wan@google.com (Zhanyong Wan) // Author: wan@google.com (Zhanyong Wan)
#include <gtest/gtest.h> #include "gtest/gtest.h"
int main(int argc, char **argv) { int main(int argc, char **argv) {

View File

@ -32,8 +32,8 @@
// //
// Author: wan@google.com (Zhanyong Wan) // Author: wan@google.com (Zhanyong Wan)
#include <gtest/gtest-spi.h> #include "gtest/gtest-spi.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -49,8 +49,8 @@
#include <iostream> #include <iostream>
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <gtest/gtest-spi.h> #include "gtest/gtest-spi.h"
// A user-defined data type. // A user-defined data type.
struct Bool { struct Bool {

View File

@ -31,7 +31,7 @@
// //
// Unit test for include/gtest/gtest_prod.h. // Unit test for include/gtest/gtest_prod.h.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include "test/production.h" #include "test/production.h"
// Tests that private members can be accessed from a TEST declared as // Tests that private members can be accessed from a TEST declared as

View File

@ -33,7 +33,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <iostream> #include <iostream>
#include <gtest/gtest.h> #include "gtest/gtest.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -31,7 +31,7 @@
// Verifies that test shuffling works. // Verifies that test shuffling works.
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace { namespace {

View File

@ -32,7 +32,7 @@
// This test verifies that it's possible to use Google Test by including // This test verifies that it's possible to use Google Test by including
// the gtest.h header file alone. // the gtest.h header file alone.
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace { namespace {

View File

@ -32,7 +32,7 @@
// Tests that SCOPED_TRACE() and various Google Test assertions can be // Tests that SCOPED_TRACE() and various Google Test assertions can be
// used in a large number of threads concurrently. // used in a large number of threads concurrently.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <iostream> #include <iostream>
#include <vector> #include <vector>

View File

@ -31,7 +31,7 @@
// Tests Google Test's throw-on-failure mode with exceptions enabled. // Tests Google Test's throw-on-failure mode with exceptions enabled.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View File

@ -35,7 +35,7 @@
// invoked by gtest_throw_on_failure_test.py, and is expected to exit // invoked by gtest_throw_on_failure_test.py, and is expected to exit
// with non-zero in the throw-on-failure mode or 0 otherwise. // with non-zero in the throw-on-failure mode or 0 otherwise.
#include <gtest/gtest.h> #include "gtest/gtest.h"
int main(int argc, char** argv) { int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);

View File

@ -29,7 +29,7 @@
// //
// Author: wan@google.com (Zhanyong Wan) // Author: wan@google.com (Zhanyong Wan)
#include <gtest/gtest.h> #include "gtest/gtest.h"
TEST(DummyTest, Dummy) { TEST(DummyTest, Dummy) {
// This test doesn't verify anything. We just need it to create a // This test doesn't verify anything. We just need it to create a

View File

@ -32,7 +32,7 @@
// Tests for Google Test itself. This verifies that the basic constructs of // Tests for Google Test itself. This verifies that the basic constructs of
// Google Test work. // Google Test work.
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <vector> #include <vector>
// Verifies that the command line flag variables can be accessed // Verifies that the command line flag variables can be accessed
@ -57,7 +57,7 @@ TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
EXPECT_TRUE(dummy || !dummy); // Suppresses warning that dummy is unused. EXPECT_TRUE(dummy || !dummy); // Suppresses warning that dummy is unused.
} }
#include <gtest/gtest-spi.h> #include "gtest/gtest-spi.h"
// Indicates that this translation unit is part of Google Test's // Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is // implementation. It must come before gtest-internal-inl.h is

View File

@ -32,7 +32,7 @@
// gtest_xml_outfile1_test_ writes some xml via TestProperty used by // gtest_xml_outfile1_test_ writes some xml via TestProperty used by
// gtest_xml_outfiles_test.py // gtest_xml_outfiles_test.py
#include <gtest/gtest.h> #include "gtest/gtest.h"
class PropertyOne : public testing::Test { class PropertyOne : public testing::Test {
protected: protected:

View File

@ -32,7 +32,7 @@
// gtest_xml_outfile2_test_ writes some xml via TestProperty used by // gtest_xml_outfile2_test_ writes some xml via TestProperty used by
// gtest_xml_outfiles_test.py // gtest_xml_outfiles_test.py
#include <gtest/gtest.h> #include "gtest/gtest.h"
class PropertyTwo : public testing::Test { class PropertyTwo : public testing::Test {
protected: protected:

View File

@ -38,7 +38,7 @@
// This program will be invoked from a Python unit test. Don't run it // This program will be invoked from a Python unit test. Don't run it
// directly. // directly.
#include <gtest/gtest.h> #include "gtest/gtest.h"
using ::testing::InitGoogleTest; using ::testing::InitGoogleTest;
using ::testing::TestEventListeners; using ::testing::TestEventListeners;

View File

@ -34,7 +34,7 @@
#ifndef GTEST_TEST_PRODUCTION_H_ #ifndef GTEST_TEST_PRODUCTION_H_
#define GTEST_TEST_PRODUCTION_H_ #define GTEST_TEST_PRODUCTION_H_
#include <gtest/gtest_prod.h> #include "gtest/gtest_prod.h"
class PrivateCode { class PrivateCode {
public: public:

View File

@ -36,7 +36,7 @@
// This is a simple test file for the Widget class in the Widget.framework // This is a simple test file for the Widget class in the Widget.framework
#include <string> #include <string>
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <Widget/widget.h> #include <Widget/widget.h>