Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
dac3e879
Commit
dac3e879
authored
Sep 14, 2010
by
zhanyong.wan
Browse files
Include gtest headers as user headers instead of system headers.
parent
88e0df62
Changes
87
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
35 additions
and
35 deletions
+35
-35
test/gtest_break_on_failure_unittest_.cc
test/gtest_break_on_failure_unittest_.cc
+1
-1
test/gtest_catch_exceptions_test_.cc
test/gtest_catch_exceptions_test_.cc
+1
-1
test/gtest_color_test_.cc
test/gtest_color_test_.cc
+1
-1
test/gtest_env_var_test_.cc
test/gtest_env_var_test_.cc
+1
-1
test/gtest_environment_test.cc
test/gtest_environment_test.cc
+1
-1
test/gtest_filter_unittest_.cc
test/gtest_filter_unittest_.cc
+1
-1
test/gtest_help_test_.cc
test/gtest_help_test_.cc
+1
-1
test/gtest_list_tests_unittest_.cc
test/gtest_list_tests_unittest_.cc
+1
-1
test/gtest_main_unittest.cc
test/gtest_main_unittest.cc
+1
-1
test/gtest_nc.cc
test/gtest_nc.cc
+14
-14
test/gtest_no_test_unittest.cc
test/gtest_no_test_unittest.cc
+1
-1
test/gtest_output_test_.cc
test/gtest_output_test_.cc
+2
-2
test/gtest_pred_impl_unittest.cc
test/gtest_pred_impl_unittest.cc
+2
-2
test/gtest_prod_test.cc
test/gtest_prod_test.cc
+1
-1
test/gtest_repeat_test.cc
test/gtest_repeat_test.cc
+1
-1
test/gtest_shuffle_test_.cc
test/gtest_shuffle_test_.cc
+1
-1
test/gtest_sole_header_test.cc
test/gtest_sole_header_test.cc
+1
-1
test/gtest_stress_test.cc
test/gtest_stress_test.cc
+1
-1
test/gtest_throw_on_failure_ex_test.cc
test/gtest_throw_on_failure_ex_test.cc
+1
-1
test/gtest_throw_on_failure_test_.cc
test/gtest_throw_on_failure_test_.cc
+1
-1
No files found.
test/gtest_break_on_failure_unittest_.cc
View file @
dac3e879
...
@@ -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>
...
...
test/gtest_catch_exceptions_test_.cc
View file @
dac3e879
...
@@ -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().
...
...
test/gtest_color_test_.cc
View file @
dac3e879
...
@@ -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
...
...
test/gtest_env_var_test_.cc
View file @
dac3e879
...
@@ -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>
...
...
test/gtest_environment_test.cc
View file @
dac3e879
...
@@ -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"
...
...
test/gtest_filter_unittest_.cc
View file @
dac3e879
...
@@ -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
{
...
...
test/gtest_help_test_.cc
View file @
dac3e879
...
@@ -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,
...
...
test/gtest_list_tests_unittest_.cc
View file @
dac3e879
...
@@ -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
{
...
...
test/gtest_main_unittest.cc
View file @
dac3e879
...
@@ -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.
...
...
test/gtest_nc.cc
View file @
dac3e879
...
@@ -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
();
...
...
test/gtest_no_test_unittest.cc
View file @
dac3e879
...
@@ -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
)
{
...
...
test/gtest_output_test_.cc
View file @
dac3e879
...
@@ -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
...
...
test/gtest_pred_impl_unittest.cc
View file @
dac3e879
...
@@ -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
{
...
...
test/gtest_prod_test.cc
View file @
dac3e879
...
@@ -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
...
...
test/gtest_repeat_test.cc
View file @
dac3e879
...
@@ -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
...
...
test/gtest_shuffle_test_.cc
View file @
dac3e879
...
@@ -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
{
...
...
test/gtest_sole_header_test.cc
View file @
dac3e879
...
@@ -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
{
...
...
test/gtest_stress_test.cc
View file @
dac3e879
...
@@ -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>
...
...
test/gtest_throw_on_failure_ex_test.cc
View file @
dac3e879
...
@@ -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>
...
...
test/gtest_throw_on_failure_test_.cc
View file @
dac3e879
...
@@ -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
);
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment