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
97274b1e
Unverified
Commit
97274b1e
authored
Aug 19, 2018
by
Gennadiy Civil
Committed by
GitHub
Aug 19, 2018
Browse files
Merge branch 'master' into fix-argc
parents
88cd6651
d1c1aac7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
googletest/cmake/internal_utils.cmake
googletest/cmake/internal_utils.cmake
+5
-0
googletest/docs/advanced.md
googletest/docs/advanced.md
+4
-4
googletest/include/gtest/gtest-printers.h
googletest/include/gtest/gtest-printers.h
+5
-4
No files found.
googletest/cmake/internal_utils.cmake
View file @
97274b1e
...
...
@@ -38,6 +38,11 @@ macro(fix_default_compiler_settings_)
# We prefer more strict warning checking for building Google Test.
# Replaces /W3 with /W4 in defaults.
string
(
REPLACE
"/W3"
"/W4"
${
flag_var
}
"
${${
flag_var
}}
"
)
# Prevent D9025 warning for targets that have exception handling
# turned off (/EHs-c- flag). Where required, exceptions are explicitly
# re-enabled using the cxx_exception_flags variable.
string
(
REPLACE
"/EHsc"
""
${
flag_var
}
"
${${
flag_var
}}
"
)
endforeach
()
endif
()
endmacro
()
...
...
googletest/docs/advanced.md
View file @
97274b1e
...
...
@@ -572,7 +572,7 @@ namespace foo {
class
Bar
{
// We want googletest to be able to print instances of this.
...
// Create a free inline friend function.
friend
::
std
::
ostream
&
operator
<<
(
::
std
::
ostream
&
os
,
const
Bar
&
bar
)
{
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Bar
&
bar
)
{
return
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
}
};
...
...
@@ -580,7 +580,7 @@ class Bar { // We want googletest to be able to print instances of this.
// If you can't declare the function in the class it's important that the
// << operator is defined in the SAME namespace that defines Bar. C++'s look-up
// rules rely on that.
::
std
::
ostream
&
operator
<<
(
::
std
::
ostream
&
os
,
const
Bar
&
bar
)
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Bar
&
bar
)
{
return
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
}
...
...
@@ -601,7 +601,7 @@ namespace foo {
class
Bar
{
...
friend
void
PrintTo
(
const
Bar
&
bar
,
::
std
::
ostream
*
os
)
{
friend
void
PrintTo
(
const
Bar
&
bar
,
std
::
ostream
*
os
)
{
*
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
}
};
...
...
@@ -609,7 +609,7 @@ class Bar {
// If you can't declare the function in the class it's important that PrintTo()
// is defined in the SAME namespace that defines Bar. C++'s look-up rules rely
// on that.
void
PrintTo
(
const
Bar
&
bar
,
::
std
::
ostream
*
os
)
{
void
PrintTo
(
const
Bar
&
bar
,
std
::
ostream
*
os
)
{
*
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
}
...
...
googletest/include/gtest/gtest-printers.h
View file @
97274b1e
...
...
@@ -978,12 +978,13 @@ struct TuplePolicy {
static
const
size_t
tuple_size
=
::
std
::
tr1
::
tuple_size
<
Tuple
>::
value
;
template
<
size_t
I
>
struct
tuple_element
:
::
std
::
tr1
::
tuple_element
<
I
,
Tuple
>
{};
struct
tuple_element
:
::
std
::
tr1
::
tuple_element
<
static_cast
<
int
>
(
I
),
Tuple
>
{
};
template
<
size_t
I
>
static
typename
AddReference
<
const
typename
::
std
::
tr1
::
tuple_element
<
I
,
Tuple
>::
type
>::
type
get
(
const
Tuple
&
tuple
)
{
static
typename
AddReference
<
const
typename
::
std
::
tr1
::
tuple_element
<
static_cast
<
int
>
(
I
)
,
Tuple
>::
type
>::
type
get
(
const
Tuple
&
tuple
)
{
return
::
std
::
tr1
::
get
<
I
>
(
tuple
);
}
};
...
...
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