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
8d6a4f8a
Commit
8d6a4f8a
authored
Jul 22, 2021
by
CJ Johnson
Browse files
Merge pull request #3472 from jwnimmer-tri:fix-dont-macros
PiperOrigin-RevId: 385627491
parents
56e4b1a5
a42111b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
googletest/README.md
googletest/README.md
+3
-1
googletest/include/gtest/gtest.h
googletest/include/gtest/gtest.h
+4
-3
No files found.
googletest/README.md
View file @
8d6a4f8a
...
@@ -203,7 +203,9 @@ add
...
@@ -203,7 +203,9 @@ add
-DGTEST_DONT_DEFINE_FOO=1
-DGTEST_DONT_DEFINE_FOO=1
to the compiler flags to tell GoogleTest to change the macro's name from
`FOO`
to the compiler flags to tell GoogleTest to change the macro's name from
`FOO`
to
`GTEST_FOO`
. Currently
`FOO`
can be
`FAIL`
,
`SUCCEED`
, or
`TEST`
. For
to
`GTEST_FOO`
. Currently
`FOO`
can be
`ASSERT_EQ`
,
`ASSERT_FALSE`
,
`ASSERT_GE`
,
`ASSERT_GT`
,
`ASSERT_LE`
,
`ASSERT_LT`
,
`ASSERT_NE`
,
`ASSERT_TRUE`
,
`EXPECT_FALSE`
,
`EXPECT_TRUE`
,
`FAIL`
,
`SUCCEED`
,
`TEST`
, or
`TEST_F`
. For
example, with
`-DGTEST_DONT_DEFINE_TEST=1`
, you'll need to write
example, with
`-DGTEST_DONT_DEFINE_TEST=1`
, you'll need to write
GTEST_TEST(SomeTest, DoesThis) { ... }
GTEST_TEST(SomeTest, DoesThis) { ... }
...
...
googletest/include/gtest/gtest.h
View file @
8d6a4f8a
...
@@ -2385,11 +2385,12 @@ constexpr bool StaticAssertTypeEq() noexcept {
...
@@ -2385,11 +2385,12 @@ constexpr bool StaticAssertTypeEq() noexcept {
// }
// }
//
//
// GOOGLETEST_CM0011 DO NOT DELETE
// GOOGLETEST_CM0011 DO NOT DELETE
#if !GTEST_DONT_DEFINE_TEST
#define GTEST_TEST_F(test_fixture, test_name)\
#define TEST_F(test_fixture, test_name)\
GTEST_TEST_(test_fixture, test_name, test_fixture, \
GTEST_TEST_(test_fixture, test_name, test_fixture, \
::testing::internal::GetTypeId<test_fixture>())
::testing::internal::GetTypeId<test_fixture>())
#endif // !GTEST_DONT_DEFINE_TEST
#if !GTEST_DONT_DEFINE_TEST_F
#define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
#endif
// Returns a path to temporary directory.
// Returns a path to temporary directory.
// Tries to determine an appropriate directory for the platform.
// Tries to determine an appropriate directory for the platform.
...
...
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