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
96ddffe8
Commit
96ddffe8
authored
Jun 18, 2014
by
kosak
Browse files
Reduce the number of occurrences of gendered pronouns in gtest.
parent
21ee8a2e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
25 deletions
+25
-25
include/gtest/gtest.h
include/gtest/gtest.h
+11
-11
src/gtest-death-test.cc
src/gtest-death-test.cc
+3
-3
src/gtest-internal-inl.h
src/gtest-internal-inl.h
+1
-1
src/gtest-port.cc
src/gtest-port.cc
+3
-3
src/gtest-test-part.cc
src/gtest-test-part.cc
+3
-3
src/gtest.cc
src/gtest.cc
+4
-4
No files found.
include/gtest/gtest.h
View file @
96ddffe8
...
@@ -70,14 +70,14 @@
...
@@ -70,14 +70,14 @@
// class ::string, which has the same interface as ::std::string, but
// class ::string, which has the same interface as ::std::string, but
// has a different implementation.
// has a different implementation.
//
//
//
The user
can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that
//
You
can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that
// ::string is available AND is a distinct type to ::std::string, or
// ::string is available AND is a distinct type to ::std::string, or
// define it to 0 to indicate otherwise.
// define it to 0 to indicate otherwise.
//
//
// If
the user's
::std::string and ::string are the same class
due to
// If ::std::string and ::string are the same class
on your platform
// aliasing,
he
should define GTEST_HAS_GLOBAL_STRING to 0.
//
due to
aliasing,
you
should define GTEST_HAS_GLOBAL_STRING to 0.
//
//
// If
the user doesn'
t define GTEST_HAS_GLOBAL_STRING, it is defined
// If
you do no
t define GTEST_HAS_GLOBAL_STRING, it is defined
// heuristically.
// heuristically.
namespace
testing
{
namespace
testing
{
...
@@ -455,17 +455,17 @@ class GTEST_API_ Test {
...
@@ -455,17 +455,17 @@ class GTEST_API_ Test {
// Uses a GTestFlagSaver to save and restore all Google Test flags.
// Uses a GTestFlagSaver to save and restore all Google Test flags.
const
internal
::
GTestFlagSaver
*
const
gtest_flag_saver_
;
const
internal
::
GTestFlagSaver
*
const
gtest_flag_saver_
;
// Often a user mis
-
spells SetUp() as Setup() and spends a long time
// Often a user misspells SetUp() as Setup() and spends a long time
// wondering why it is never called by Google Test. The declaration of
// wondering why it is never called by Google Test. The declaration of
// the following method is solely for catching such an error at
// the following method is solely for catching such an error at
// compile time:
// compile time:
//
//
// - The return type is deliberately chosen to be not void, so it
// - The return type is deliberately chosen to be not void, so it
// will be a conflict if
a user declares void Setup() in his test
// will be a conflict if
void Setup() is declared in the user's
// fixture.
//
test
fixture.
//
//
// - This method is private, so it will be another compiler error
// - This method is private, so it will be another compiler error
// if
a user
call
s it
from
hi
s test fixture.
// if
the method is
call
ed
from
the user'
s test fixture.
//
//
// DO NOT OVERRIDE THIS FUNCTION.
// DO NOT OVERRIDE THIS FUNCTION.
//
//
...
@@ -948,7 +948,7 @@ class GTEST_API_ TestCase {
...
@@ -948,7 +948,7 @@ class GTEST_API_ TestCase {
};
};
// An Environment object is capable of setting up and tearing down an
// An Environment object is capable of setting up and tearing down an
// environment.
The user
should subclass this to define
his
own
// environment.
You
should subclass this to define
your
own
// environment(s).
// environment(s).
//
//
// An Environment object does the set-up and tear-down in virtual
// An Environment object does the set-up and tear-down in virtual
...
@@ -2231,8 +2231,8 @@ bool StaticAssertTypeEq() {
...
@@ -2231,8 +2231,8 @@ bool StaticAssertTypeEq() {
// The convention is to end the test case name with "Test". For
// The convention is to end the test case name with "Test". For
// example, a test case for the Foo class can be named FooTest.
// example, a test case for the Foo class can be named FooTest.
//
//
// T
he user should put his test code
between braces after
using this
// T
est code should appear
between braces after
an invocation of
// macro. Example:
//
this
macro. Example:
//
//
// TEST(FooTest, InitializesCorrectly) {
// TEST(FooTest, InitializesCorrectly) {
// Foo foo;
// Foo foo;
...
...
src/gtest-death-test.cc
View file @
96ddffe8
...
@@ -68,9 +68,9 @@
...
@@ -68,9 +68,9 @@
// 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
// included, or there will be a compiler error. This trick
i
s to
// included, or there will be a compiler error. This trick
exist
s to
// prevent
a user from
accidental
ly
inclu
ding
gtest-internal-inl.h in
// prevent
the
accidental inclu
sion of
gtest-internal-inl.h in
the
//
hi
s code.
//
user'
s code.
#define GTEST_IMPLEMENTATION_ 1
#define GTEST_IMPLEMENTATION_ 1
#include "src/gtest-internal-inl.h"
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
#undef GTEST_IMPLEMENTATION_
...
...
src/gtest-internal-inl.h
View file @
96ddffe8
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is
// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is
// part of Google Test's implementation; otherwise it's undefined.
// part of Google Test's implementation; otherwise it's undefined.
#if !GTEST_IMPLEMENTATION_
#if !GTEST_IMPLEMENTATION_
//
A user is trying to
include
this
from
hi
s code
-
just say no.
//
If this file is
include
d
from
the user'
s code
,
just say no.
# error "gtest-internal-inl.h is part of Google Test's internal implementation."
# error "gtest-internal-inl.h is part of Google Test's internal implementation."
# error "It must not be included except by Google Test itself."
# error "It must not be included except by Google Test itself."
#endif // GTEST_IMPLEMENTATION_
#endif // GTEST_IMPLEMENTATION_
...
...
src/gtest-port.cc
View file @
96ddffe8
...
@@ -64,9 +64,9 @@
...
@@ -64,9 +64,9 @@
// 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
// included, or there will be a compiler error. This trick
i
s to
// included, or there will be a compiler error. This trick
exist
s to
// prevent
a user from
accidental
ly
inclu
ding
gtest-internal-inl.h in
// prevent
the
accidental inclu
sion of
gtest-internal-inl.h in
the
//
hi
s code.
//
user'
s code.
#define GTEST_IMPLEMENTATION_ 1
#define GTEST_IMPLEMENTATION_ 1
#include "src/gtest-internal-inl.h"
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
#undef GTEST_IMPLEMENTATION_
...
...
src/gtest-test-part.cc
View file @
96ddffe8
...
@@ -35,9 +35,9 @@
...
@@ -35,9 +35,9 @@
// 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
// included, or there will be a compiler error. This trick
i
s to
// included, or there will be a compiler error. This trick
exist
s to
// prevent
a user from
accidental
ly
inclu
ding
gtest-internal-inl.h in
// prevent
the
accidental inclu
sion of
gtest-internal-inl.h in
the
//
hi
s code.
//
user'
s code.
#define GTEST_IMPLEMENTATION_ 1
#define GTEST_IMPLEMENTATION_ 1
#include "src/gtest-internal-inl.h"
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
#undef GTEST_IMPLEMENTATION_
...
...
src/gtest.cc
View file @
96ddffe8
...
@@ -1962,8 +1962,8 @@ bool Test::HasSameFixtureClass() {
...
@@ -1962,8 +1962,8 @@ bool Test::HasSameFixtureClass() {
const
bool
this_is_TEST
=
this_fixture_id
==
internal
::
GetTestTypeId
();
const
bool
this_is_TEST
=
this_fixture_id
==
internal
::
GetTestTypeId
();
if
(
first_is_TEST
||
this_is_TEST
)
{
if
(
first_is_TEST
||
this_is_TEST
)
{
//
The user mixed
TEST and TEST_F
in this test case - we'll tell
//
Both
TEST and TEST_F
appear in same test case, which is incorrect.
//
him/h
er how to fix
i
t.
//
Tell the us
er how to fix t
his
.
// Gets the name of the TEST and the name of the TEST_F. Note
// Gets the name of the TEST and the name of the TEST_F. Note
// that first_is_TEST and this_is_TEST cannot both be true, as
// that first_is_TEST and this_is_TEST cannot both be true, as
...
@@ -1983,8 +1983,8 @@ bool Test::HasSameFixtureClass() {
...
@@ -1983,8 +1983,8 @@ bool Test::HasSameFixtureClass() {
<<
"want to change the TEST to TEST_F or move it to another test
\n
"
<<
"want to change the TEST to TEST_F or move it to another test
\n
"
<<
"case."
;
<<
"case."
;
}
else
{
}
else
{
// T
he user defined t
wo fixture classes with the same name
in
// Two fixture classes with the same name
appear in two different
//
two
namespaces
- we'll tell him/h
er how to fix
i
t.
// namespaces
, which is not allowed. Tell the us
er how to fix t
his
.
ADD_FAILURE
()
ADD_FAILURE
()
<<
"All tests in the same test case must use the same test fixture
\n
"
<<
"All tests in the same test case must use the same test fixture
\n
"
<<
"class. However, in test case "
<<
"class. However, in test case "
...
...
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