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
fc01f532
Commit
fc01f532
authored
Feb 28, 2013
by
zhanyong.wan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes unused function warning on Mac, and fixes compatibility with newer GCC.
parent
6a036a5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
gtest-port.h
include/gtest/internal/gtest-port.h
+2
-2
gtest.cc
src/gtest.cc
+2
-2
gtest-death-test_test.cc
test/gtest-death-test_test.cc
+2
-2
No files found.
include/gtest/internal/gtest-port.h
View file @
fc01f532
...
@@ -813,8 +813,8 @@ struct CompileAssert {
...
@@ -813,8 +813,8 @@ struct CompileAssert {
};
};
#define GTEST_COMPILE_ASSERT_(expr, msg) \
#define GTEST_COMPILE_ASSERT_(expr, msg) \
typedef ::testing::internal::CompileAssert<(
bool
(expr))> \
typedef ::testing::internal::CompileAssert<(
static_cast<bool>
(expr))> \
msg[
bool(expr) ? 1 : -1]
msg[
static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_
// Implementation details of GTEST_COMPILE_ASSERT_:
// Implementation details of GTEST_COMPILE_ASSERT_:
//
//
...
...
src/gtest.cc
View file @
fc01f532
...
@@ -3571,13 +3571,13 @@ Environment* UnitTest::AddEnvironment(Environment* env) {
...
@@ -3571,13 +3571,13 @@ Environment* UnitTest::AddEnvironment(Environment* env) {
// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call
// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call
// this to report their results. The user code should use the
// this to report their results. The user code should use the
// assertion macros instead of calling this directly.
// assertion macros instead of calling this directly.
GTEST_LOCK_EXCLUDED_
(
mutex_
)
void
UnitTest
::
AddTestPartResult
(
void
UnitTest
::
AddTestPartResult
(
TestPartResult
::
Type
result_type
,
TestPartResult
::
Type
result_type
,
const
char
*
file_name
,
const
char
*
file_name
,
int
line_number
,
int
line_number
,
const
std
::
string
&
message
,
const
std
::
string
&
message
,
const
std
::
string
&
os_stack_trace
)
const
std
::
string
&
os_stack_trace
)
{
GTEST_LOCK_EXCLUDED_
(
mutex_
)
{
Message
msg
;
Message
msg
;
msg
<<
message
;
msg
<<
message
;
...
...
test/gtest-death-test_test.cc
View file @
fc01f532
...
@@ -465,6 +465,8 @@ TEST_F(TestForDeathTest, MixedStyles) {
...
@@ -465,6 +465,8 @@ TEST_F(TestForDeathTest, MixedStyles) {
EXPECT_DEATH
(
_exit
(
1
),
""
);
EXPECT_DEATH
(
_exit
(
1
),
""
);
}
}
# if GTEST_HAS_CLONE && GTEST_HAS_PTHREAD
namespace
{
namespace
{
bool
pthread_flag
;
bool
pthread_flag
;
...
@@ -475,8 +477,6 @@ void SetPthreadFlag() {
...
@@ -475,8 +477,6 @@ void SetPthreadFlag() {
}
// namespace
}
// namespace
# if GTEST_HAS_CLONE && GTEST_HAS_PTHREAD
TEST_F
(
TestForDeathTest
,
DoesNotExecuteAtforkHooks
)
{
TEST_F
(
TestForDeathTest
,
DoesNotExecuteAtforkHooks
)
{
if
(
!
testing
::
GTEST_FLAG
(
death_test_use_fork
))
{
if
(
!
testing
::
GTEST_FLAG
(
death_test_use_fork
))
{
testing
::
GTEST_FLAG
(
death_test_style
)
=
"threadsafe"
;
testing
::
GTEST_FLAG
(
death_test_style
)
=
"threadsafe"
;
...
...
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