Commit dac3e879 authored by zhanyong.wan's avatar zhanyong.wan
Browse files

Include gtest headers as user headers instead of system headers.

parent 88e0df62
...@@ -39,7 +39,7 @@ ...@@ -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>
......
...@@ -32,7 +32,7 @@ ...@@ -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().
......
...@@ -35,7 +35,7 @@ ...@@ -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
......
...@@ -32,7 +32,7 @@ ...@@ -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>
......
...@@ -33,7 +33,7 @@ ...@@ -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"
......
...@@ -38,7 +38,7 @@ ...@@ -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 {
......
...@@ -32,7 +32,7 @@ ...@@ -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,
......
...@@ -38,7 +38,7 @@ ...@@ -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 {
......
...@@ -29,7 +29,7 @@ ...@@ -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.
......
...@@ -42,7 +42,7 @@ ...@@ -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) { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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>); ...@@ -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>); ...@@ -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>); ...@@ -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>); ...@@ -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() { ...@@ -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() { ...@@ -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();
......
...@@ -32,7 +32,7 @@ ...@@ -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) {
......
...@@ -32,8 +32,8 @@ ...@@ -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
......
...@@ -49,8 +49,8 @@ ...@@ -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 {
......
...@@ -31,7 +31,7 @@ ...@@ -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
......
...@@ -33,7 +33,7 @@ ...@@ -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
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
// Verifies that test shuffling works. // Verifies that test shuffling works.
#include <gtest/gtest.h> #include "gtest/gtest.h"
namespace { namespace {
......
...@@ -32,7 +32,7 @@ ...@@ -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 {
......
...@@ -32,7 +32,7 @@ ...@@ -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>
......
...@@ -31,7 +31,7 @@ ...@@ -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>
......
...@@ -35,7 +35,7 @@ ...@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment