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 ###
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
1, no if it's undefined.).

View File

@ -38,7 +38,7 @@
#ifndef 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 {

View File

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

View File

@ -149,7 +149,7 @@ INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
#endif // 0
#include <gtest/internal/gtest-port.h>
#include "gtest/internal/gtest-port.h"
#if !GTEST_OS_SYMBIAN
#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
// *unconditionally*. Therefore these #includes cannot be moved
// inside #if GTEST_HAS_PARAM_TEST.
#include <gtest/internal/gtest-internal.h>
#include <gtest/internal/gtest-param-util.h>
#include <gtest/internal/gtest-param-util-generated.h>
#include "gtest/internal/gtest-internal.h"
#include "gtest/internal/gtest-param-util.h"
#include "gtest/internal/gtest-param-util-generated.h"
#if GTEST_HAS_PARAM_TEST

View File

@ -147,7 +147,7 @@ INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
#endif // 0
#include <gtest/internal/gtest-port.h>
#include "gtest/internal/gtest-port.h"
#if !GTEST_OS_SYMBIAN
#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
// *unconditionally*. Therefore these #includes cannot be moved
// inside #if GTEST_HAS_PARAM_TEST.
#include <gtest/internal/gtest-internal.h>
#include <gtest/internal/gtest-param-util.h>
#include <gtest/internal/gtest-param-util-generated.h>
#include "gtest/internal/gtest-internal.h"
#include "gtest/internal/gtest-param-util.h"
#include "gtest/internal/gtest-param-util-generated.h"
#if GTEST_HAS_PARAM_TEST

View File

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

View File

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

View File

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

View File

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

View File

@ -54,15 +54,15 @@
#include <limits>
#include <vector>
#include <gtest/internal/gtest-internal.h>
#include <gtest/internal/gtest-string.h>
#include <gtest/gtest-death-test.h>
#include <gtest/gtest-message.h>
#include <gtest/gtest-param-test.h>
#include <gtest/gtest-printers.h>
#include <gtest/gtest_prod.h>
#include <gtest/gtest-test-part.h>
#include <gtest/gtest-typed-test.h>
#include "gtest/internal/gtest-internal.h"
#include "gtest/internal/gtest-string.h"
#include "gtest/gtest-death-test.h"
#include "gtest/gtest-message.h"
#include "gtest/gtest-param-test.h"
#include "gtest/gtest-printers.h"
#include "gtest/gtest_prod.h"
#include "gtest/gtest-test-part.h"
#include "gtest/gtest-typed-test.h"
// Depending on the platform, different string classes are available.
// 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
// generic predicate assertion macros.
#include <gtest/gtest_pred_impl.h>
#include "gtest/gtest_pred_impl.h"
// Macros for testing equalities and inequalities.
//

View File

@ -37,7 +37,7 @@
#ifndef 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 internal {

View File

@ -40,7 +40,7 @@
#ifndef 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 internal {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -47,7 +47,7 @@
#include <limits.h>
#include <time.h>
#include "sample3-inl.h"
#include <gtest/gtest.h>
#include "gtest/gtest.h"
#include "sample1.h"
// 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.
#include "prime_tables.h"
#include <gtest/gtest.h>
#include "gtest/gtest.h"
// First, we define some factory functions for creating instances of
// 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.
#include "prime_tables.h"
#include <gtest/gtest.h>
#include "gtest/gtest.h"
#if GTEST_HAS_PARAM_TEST

View File

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

View File

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

View File

@ -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:

View File

@ -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 {

View File

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

View File

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

View File

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

View File

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

View File

@ -29,7 +29,7 @@
//
// Author: wan@google.com (Zhanyong Wan)
#include <gtest/internal/gtest-port.h>
#include "gtest/internal/gtest-port.h"
#include <limits.h>
#include <stdlib.h>
@ -51,9 +51,9 @@
#include <mach/vm_map.h>
#endif // GTEST_OS_MAC
#include <gtest/gtest-spi.h>
#include <gtest/gtest-message.h>
#include <gtest/internal/gtest-string.h>
#include "gtest/gtest-spi.h"
#include "gtest/gtest-message.h"
#include "gtest/internal/gtest-string.h"
// Indicates that this translation unit is part of Google Test's
// 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
// defines Foo.
#include <gtest/gtest-printers.h>
#include "gtest/gtest-printers.h"
#include <ctype.h>
#include <stdio.h>
#include <ostream> // NOLINT
#include <string>
#include <gtest/internal/gtest-port.h>
#include "gtest/internal/gtest-port.h"
namespace testing {

View File

@ -31,7 +31,7 @@
//
// 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
// implementation. It must come before gtest-internal-inl.h is

View File

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

View File

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

View File

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

View File

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

View File

@ -30,10 +30,10 @@
// Authors: Dan Egnor (egnor@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 <gtest/gtest.h>
#include "gtest/gtest.h"
namespace {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -37,7 +37,7 @@
#ifndef 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

View File

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

View File

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

View File

@ -30,9 +30,9 @@
// 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::Test;

View File

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

View File

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

View File

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

View File

@ -32,7 +32,7 @@
#ifndef 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

View File

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

View File

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

View File

@ -32,7 +32,7 @@
// 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.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
#include <stdio.h> // NOLINT
#include <stdlib.h> // For exit().

View File

@ -35,7 +35,7 @@
#include <stdio.h>
#include <gtest/gtest.h>
#include "gtest/gtest.h"
// Indicates that this translation unit is part of Google Test's
// 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
// variables correctly.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
#include <iostream>

View File

@ -33,7 +33,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <gtest/gtest.h>
#include "gtest/gtest.h"
#define GTEST_IMPLEMENTATION_ 1 // Required for the next #include.
#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
// directly.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
namespace {

View File

@ -32,7 +32,7 @@
// This program is meant to be run by gtest_help_test.py. Do not run
// it directly.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
// When a help flag is specified, this program should skip the tests
// 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.
// Don't run it directly.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
namespace {

View File

@ -29,7 +29,7 @@
//
// 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
// gtest_main instead of gtest.

View File

@ -42,7 +42,7 @@
#ifdef TEST_CANNOT_IGNORE_RUN_ALL_TESTS_RESULT
// 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) {
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
// Setup() method in a test fixture.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
class MyTest : public testing::Test {
protected:
@ -69,7 +69,7 @@ class MyTest : public testing::Test {
// Tests that the compiler catches the typo when a user calls Setup()
// from a test fixture.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
class MyTest : public testing::Test {
protected:
@ -82,7 +82,7 @@ class MyTest : public testing::Test {
// Tests that the compiler catches the typo when a user declares a
// Setup() method in a subclass of Environment.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
class MyEnvironment : public testing::Environment {
public:
@ -93,7 +93,7 @@ class MyEnvironment : public testing::Environment {
// Tests that the compiler catches the typo when a user calls Setup()
// in an Environment.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
class MyEnvironment : public testing::Environment {
protected:
@ -107,7 +107,7 @@ class MyEnvironment : public testing::Environment {
// Tests that the compiler catches using the wrong test case name in
// TYPED_TEST_P.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
template <typename T>
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
// REGISTER_TYPED_TEST_CASE_P.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
template <typename T>
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
// INSTANTIATE_TYPED_TEST_CASE_P.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
template <typename T>
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
// twice with the same name prefix.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
template <typename T>
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)
#include <gtest/gtest.h>
#include "gtest/gtest.h"
// Tests that StaticAssertTypeEq<T1, T2> cannot be used as a type.
testing::StaticAssertTypeEq<int, int> dummy;
#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.
static bool dummy = testing::StaticAssertTypeEq<int, const int>();
#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_CLASS)
#include <gtest/gtest.h>
#include "gtest/gtest.h"
template <typename T>
class Helper {
@ -215,7 +215,7 @@ void Test() {
#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_FUNCTION)
#include <gtest/gtest.h>
#include "gtest/gtest.h"
void Test() {
// Tests that StaticAssertTypeEq<T1, T2> works inside a function.
@ -225,7 +225,7 @@ void Test() {
#else
// A sanity test. This should compile.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
int main() {
return RUN_ALL_TESTS();

View File

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

View File

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

View File

@ -49,8 +49,8 @@
#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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@
// 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.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);

View File

@ -29,7 +29,7 @@
//
// Author: wan@google.com (Zhanyong Wan)
#include <gtest/gtest.h>
#include "gtest/gtest.h"
TEST(DummyTest, Dummy) {
// 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
// Google Test work.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
#include <vector>
// 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.
}
#include <gtest/gtest-spi.h>
#include "gtest/gtest-spi.h"
// Indicates that this translation unit is part of Google Test's
// 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_outfiles_test.py
#include <gtest/gtest.h>
#include "gtest/gtest.h"
class PropertyOne : public testing::Test {
protected:

View File

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

View File

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

View File

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

View File

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