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 @@
// 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>
......
......@@ -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().
......
......@@ -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
......
......@@ -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>
......
......@@ -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"
......
......@@ -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 {
......
......@@ -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,
......
......@@ -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 {
......
......@@ -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.
......
......@@ -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();
......
......@@ -32,7 +32,7 @@
//
// Author: wan@google.com (Zhanyong Wan)
#include <gtest/gtest.h>
#include "gtest/gtest.h"
int main(int argc, char **argv) {
......
......@@ -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
......
......@@ -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 {
......
......@@ -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
......
......@@ -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
......
......@@ -31,7 +31,7 @@
// Verifies that test shuffling works.
#include <gtest/gtest.h>
#include "gtest/gtest.h"
namespace {
......
......@@ -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 {
......
......@@ -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>
......
......@@ -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>
......
......@@ -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);
......
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