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
df6813f5
Commit
df6813f5
authored
Jun 01, 2020
by
Abseil Team
Committed by
Gennadiy Rozental
Jun 02, 2020
Browse files
Googletest export
Modify NULL to nullptr in code examples PiperOrigin-RevId: 314150792
parent
859bfe89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
googletest/docs/advanced.md
googletest/docs/advanced.md
+3
-3
No files found.
googletest/docs/advanced.md
View file @
df6813f5
...
...
@@ -1006,7 +1006,7 @@ TEST(FooTest, Bar) {
// in Subroutine() to abort the entire test.
// The actual behavior: the function goes on after Subroutine() returns.
int
*
p
=
NULL
;
int
*
p
=
nullptr
;
*
p
=
3
;
// Segfault!
}
```
...
...
@@ -1193,7 +1193,7 @@ class FooTest : public ::testing::Test {
// Can be omitted if not needed.
static
void
TearDownTestSuite
()
{
delete
shared_resource_
;
shared_resource_
=
NULL
;
shared_resource_
=
nullptr
;
}
// You can define per-test set-up logic as usual.
...
...
@@ -1206,7 +1206,7 @@ class FooTest : public ::testing::Test {
static
T
*
shared_resource_
;
};
T
*
FooTest
::
shared_resource_
=
NULL
;
T
*
FooTest
::
shared_resource_
=
nullptr
;
TEST_F
(
FooTest
,
Test1
)
{
...
you
can
refer
to
shared_resource_
here
...
...
...
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