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
48568d06
Commit
48568d06
authored
Jun 18, 2013
by
zhanyong.wan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes compatibility with C++11: (1 - 1) is no longer a NULL pointer constant.
parent
c506784b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
gtest.cc
src/gtest.cc
+5
-1
gtest_unittest.cc
test/gtest_unittest.cc
+0
-9
No files found.
src/gtest.cc
View file @
48568d06
...
@@ -182,6 +182,10 @@ bool g_help_flag = false;
...
@@ -182,6 +182,10 @@ bool g_help_flag = false;
}
// namespace internal
}
// namespace internal
static
const
char
*
GetDefaultFilter
()
{
return
kUniversalFilter
;
}
GTEST_DEFINE_bool_
(
GTEST_DEFINE_bool_
(
also_run_disabled_tests
,
also_run_disabled_tests
,
internal
::
BoolFromGTestEnv
(
"also_run_disabled_tests"
,
false
),
internal
::
BoolFromGTestEnv
(
"also_run_disabled_tests"
,
false
),
...
@@ -208,7 +212,7 @@ GTEST_DEFINE_string_(
...
@@ -208,7 +212,7 @@ GTEST_DEFINE_string_(
GTEST_DEFINE_string_
(
GTEST_DEFINE_string_
(
filter
,
filter
,
internal
::
StringFromGTestEnv
(
"filter"
,
kUniversalFilter
),
internal
::
StringFromGTestEnv
(
"filter"
,
GetDefaultFilter
()
),
"A colon-separated list of glob (not regex) patterns "
"A colon-separated list of glob (not regex) patterns "
"for filtering the tests to run, optionally followed by a "
"for filtering the tests to run, optionally followed by a "
"'-' and a : separated list of negative patterns (tests to "
"'-' and a : separated list of negative patterns (tests to "
...
...
test/gtest_unittest.cc
View file @
48568d06
...
@@ -512,15 +512,6 @@ TEST(NullLiteralTest, IsTrueForNullLiterals) {
...
@@ -512,15 +512,6 @@ TEST(NullLiteralTest, IsTrueForNullLiterals) {
EXPECT_TRUE
(
GTEST_IS_NULL_LITERAL_
(
0
));
EXPECT_TRUE
(
GTEST_IS_NULL_LITERAL_
(
0
));
EXPECT_TRUE
(
GTEST_IS_NULL_LITERAL_
(
0U
));
EXPECT_TRUE
(
GTEST_IS_NULL_LITERAL_
(
0U
));
EXPECT_TRUE
(
GTEST_IS_NULL_LITERAL_
(
0L
));
EXPECT_TRUE
(
GTEST_IS_NULL_LITERAL_
(
0L
));
# ifndef __BORLANDC__
// Some compilers may fail to detect some null pointer literals;
// as long as users of the framework don't use such literals, this
// is harmless.
EXPECT_TRUE
(
GTEST_IS_NULL_LITERAL_
(
1
-
1
));
# endif
}
}
// Tests that GTEST_IS_NULL_LITERAL_(x) is false when x is not a null
// Tests that GTEST_IS_NULL_LITERAL_(x) is false when x is not a null
...
...
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