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
8c849c58
Commit
8c849c58
authored
Sep 13, 2018
by
Jonny007-MKD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix gcc and clang issues
parent
0354ccb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+1
-1
gtest_unittest.cc
googletest/test/gtest_unittest.cc
+13
-0
No files found.
googletest/include/gtest/internal/gtest-internal.h
View file @
8c849c58
...
@@ -1192,7 +1192,7 @@ class NativeArray {
...
@@ -1192,7 +1192,7 @@ class NativeArray {
class
AdditionalMessage
class
AdditionalMessage
{
{
public
:
public
:
AdditionalMessage
(
const
std
::
string
&
message
)
:
value
(
message
)
{}
AdditionalMessage
(
const
char
*
message
)
:
value
(
message
)
{}
AdditionalMessage
&
operator
=
(
const
std
::
string
&
message
)
{
value
=
message
;
return
*
this
;
}
AdditionalMessage
&
operator
=
(
const
std
::
string
&
message
)
{
value
=
message
;
return
*
this
;
}
operator
bool
()
const
{
return
::
testing
::
internal
::
AlwaysTrue
();
}
operator
bool
()
const
{
return
::
testing
::
internal
::
AlwaysTrue
();
}
...
...
googletest/test/gtest_unittest.cc
View file @
8c849c58
...
@@ -3748,6 +3748,19 @@ TEST(ExpectTest, ASSERT_EQ_0) {
...
@@ -3748,6 +3748,19 @@ TEST(ExpectTest, ASSERT_EQ_0) {
" 0
\n
5.6"
);
" 0
\n
5.6"
);
}
}
TEST
(
AssertionTest
,
AdditionalMessage
)
{
::
testing
::
internal
::
AdditionalMessage
m
=
"servus"
;
EXPECT_EQ
(
m
.
get
(),
"servus"
);
const
char
*
cc
=
"hello"
;
m
=
cc
;
EXPECT_EQ
(
m
.
get
(),
cc
);
std
::
string
s
=
"hi"
;
m
=
s
;
EXPECT_EQ
(
m
.
get
(),
s
);
}
// Tests ASSERT_NE.
// Tests ASSERT_NE.
TEST
(
AssertionTest
,
ASSERT_NE
)
{
TEST
(
AssertionTest
,
ASSERT_NE
)
{
ASSERT_NE
(
6
,
7
);
ASSERT_NE
(
6
,
7
);
...
...
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