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
6cacb419
Unverified
Commit
6cacb419
authored
Jul 26, 2018
by
Gennadiy Civil
Committed by
GitHub
Jul 26, 2018
Browse files
Merge branch 'master' into deprecate
parents
fd4f7cc7
40904f89
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
24 deletions
+16
-24
googlemock/include/gmock/gmock-generated-function-mockers.h
googlemock/include/gmock/gmock-generated-function-mockers.h
+2
-2
googlemock/include/gmock/gmock-generated-function-mockers.h.pump
...ock/include/gmock/gmock-generated-function-mockers.h.pump
+2
-2
googlemock/test/gmock_stress_test.cc
googlemock/test/gmock_stress_test.cc
+1
-2
googletest/docs/primer.md
googletest/docs/primer.md
+7
-13
googletest/include/gtest/internal/gtest-string.h
googletest/include/gtest/internal/gtest-string.h
+1
-2
googletest/test/gtest_prod_test.cc
googletest/test/gtest_prod_test.cc
+1
-1
googletest/test/gtest_unittest.cc
googletest/test/gtest_unittest.cc
+2
-2
No files found.
googlemock/include/gmock/gmock-generated-function-mockers.h
View file @
6cacb419
...
...
@@ -357,7 +357,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
// // error when trying to resolve between this and overload 4 in
// // 'gmock_GetName(WithoutMatchers(), nullptr)'.
// MockSpec<string&()> gmock_GetName(
// const WithoutMatchers&, const Function<string&()>*) const
{
// const WithoutMatchers&, const Function<string&()>*) const
{
// // Removes const from this, calls overload 1
// return AdjustConstness_(this)->gmock_GetName();
// }
...
...
@@ -366,7 +366,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
// const string& gmock_GetName() const { ... }
// // Overload 4
// MockSpec<const string&()> gmock_GetName(
// const WithoutMatchers&, const Function<const string&()>*) const
{
// const WithoutMatchers&, const Function<const string&()>*) const
{
// // Does not remove const, calls overload 3
// return AdjustConstness_const(this)->gmock_GetName();
// }
...
...
googlemock/include/gmock/gmock-generated-function-mockers.h.pump
View file @
6cacb419
...
...
@@ -119,7 +119,7 @@ class FunctionMocker<R($As)> : public
// // error when trying to resolve between this and overload 4 in
// // 'gmock_GetName(WithoutMatchers(), nullptr)'.
// MockSpec<string&()> gmock_GetName(
// const WithoutMatchers&, const Function<string&()>*) const
{
// const WithoutMatchers&, const Function<string&()>*) const
{
// // Removes const from this, calls overload 1
// return AdjustConstness_(this)->gmock_GetName();
// }
...
...
@@ -128,7 +128,7 @@ class FunctionMocker<R($As)> : public
// const string& gmock_GetName() const { ... }
// // Overload 4
// MockSpec<const string&()> gmock_GetName(
// const WithoutMatchers&, const Function<const string&()>*) const
{
// const WithoutMatchers&, const Function<const string&()>*) const
{
// // Does not remove const, calls overload 3
// return AdjustConstness_const(this)->gmock_GetName();
// }
...
...
googlemock/test/gmock_stress_test.cc
View file @
6cacb419
...
...
@@ -33,13 +33,12 @@
// threads concurrently.
#include "gmock/gmock.h"
#include "gtest/gtest.h"
namespace
testing
{
namespace
{
// From
"gtest/internal/
gtest-port.h
"
.
// From gtest-port.h.
using
::
testing
::
internal
::
ThreadWithParam
;
// The maximum number of test threads (not including helper threads)
...
...
googletest/docs/primer.md
View file @
6cacb419
...
...
@@ -203,7 +203,7 @@ for more details.
If you're working with floating point numbers, you may want to use the floating
point variations of some of these macros in order to avoid problems caused by
rounding. See
[
Advanced googletest Topics
](
advanced
)
for details.
rounding. See
[
Advanced googletest Topics
](
advanced
.md
)
for details.
Macros in this section work with both narrow and wide string objects (
`string`
and
`wstring`
).
...
...
@@ -220,17 +220,11 @@ The assertions in this group compare two **C strings**. If you want to compare
two
`string`
objects, use
`EXPECT_EQ`
,
`EXPECT_NE`
, and etc instead.
| Fatal assertion | Nonfatal assertion | Verifies |
| ----------------------- | ----------------------- | ---------------------- |
|
`ASSERT_STREQ(str1, | `
EXPECT_STREQ(str1, | the two C strings have |
: str2);
` : str2);`
: the same content :
|
`ASSERT_STRNE(str1, | `
EXPECT_STRNE(str1, | the two C strings have |
: str2);
` : str2);`
: different contents :
|
`ASSERT_STRCASEEQ(str1, | `
EXPECT_STRCASEEQ(str1, | the two C strings have |
: str2);
` : str2);`
: the same content, :
: : : ignoring case :
|
`ASSERT_STRCASENE(str1, | `
EXPECT_STRCASENE(str1, | the two C strings have |
: str2);
` : str2);`
: different contents, :
: : : ignoring case :
| ------------------------------- | ------------------------------- | -------------------------------------------------------- |
|
`ASSERT_STREQ(str1, str2);`
|
`EXPECT_STREQ(str1, str2);`
| the two C strings have the same content |
|
`ASSERT_STRNE(str1, str2);`
|
`EXPECT_STRNE(str1, str2);`
| the two C strings have different contents |
|
`ASSERT_STRCASEEQ(str1, str2);`
|
`EXPECT_STRCASEEQ(str1, str2);`
| the two C strings have the same content, ignoring case |
|
`ASSERT_STRCASENE(str1, str2);`
|
`EXPECT_STRCASENE(str1, str2);`
| the two C strings have different contents, ignoring case |
Note that "CASE" in an assertion name means that case is ignored. A
`NULL`
pointer and an empty string are considered
*different*
.
...
...
googletest/include/gtest/internal/gtest-string.h
View file @
6cacb419
...
...
@@ -34,8 +34,7 @@
// Google Test. They are subject to change without notice. They should not used
// by code external to Google Test.
//
// This header file is #included by
// gtest/internal/gtest-internal.h.
// This header file is #included by gtest-internal.h.
// It should not be #included by other files.
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
...
...
googletest/test/gtest_prod_test.cc
View file @
6cacb419
...
...
@@ -29,7 +29,7 @@
//
// Author: wan@google.com (Zhanyong Wan)
//
// Unit test for
gtest/
gtest_prod.h.
// Unit test for gtest_prod.h.
#include "production.h"
#include "gtest/gtest.h"
...
...
googletest/test/gtest_unittest.cc
View file @
6cacb419
...
...
@@ -35,8 +35,8 @@
#include "gtest/gtest.h"
// Verifies that the command line flag variables can be accessed in
// code once "gtest
/gtest
.h" has been
//
#included.
Do not move it after other gtest #includes.
// code once "gtest.h" has been
#included.
// Do not move it after other gtest #includes.
TEST
(
CommandLineFlagsTest
,
CanBeAccessedInCodeOnceGTestHIsIncluded
)
{
bool
dummy
=
testing
::
GTEST_FLAG
(
also_run_disabled_tests
)
||
testing
::
GTEST_FLAG
(
break_on_failure
)
...
...
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