Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
876bdfa5
Commit
876bdfa5
authored
Feb 01, 2019
by
Abseil Team
Committed by
Gennadiy Civil
Feb 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Googletest export
Update example code in gtest.h to prefer override over virtual now that it is widely available in C++11. PiperOrigin-RevId: 232057792
parent
471f5bc4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
gtest.h
googletest/include/gtest/gtest.h
+4
-4
No files found.
googletest/include/gtest/gtest.h
View file @
876bdfa5
...
@@ -1854,13 +1854,13 @@ GTEST_API_ GTEST_ATTRIBUTE_PRINTF_(2, 3) void ColoredPrintf(GTestColor color,
...
@@ -1854,13 +1854,13 @@ GTEST_API_ GTEST_ATTRIBUTE_PRINTF_(2, 3) void ColoredPrintf(GTestColor color,
// FooTest() {
// FooTest() {
// // Can use GetParam() here.
// // Can use GetParam() here.
// }
// }
//
virtual ~FooTest()
{
//
~FooTest() override
{
// // Can use GetParam() here.
// // Can use GetParam() here.
// }
// }
// v
irtual void SetUp()
{
// v
oid SetUp() override
{
// // Can use GetParam() here.
// // Can use GetParam() here.
// }
// }
// v
irtual void TearDown
{
// v
oid TearDown override
{
// // Can use GetParam() here.
// // Can use GetParam() here.
// }
// }
// };
// };
...
@@ -2380,7 +2380,7 @@ bool StaticAssertTypeEq() {
...
@@ -2380,7 +2380,7 @@ bool StaticAssertTypeEq() {
//
//
// class FooTest : public testing::Test {
// class FooTest : public testing::Test {
// protected:
// protected:
// v
irtual void SetUp()
{ b_.AddElement(3); }
// v
oid SetUp() override
{ b_.AddElement(3); }
//
//
// Foo a_;
// Foo a_;
// Foo b_;
// Foo b_;
...
...
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