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
3c4f437c
Unverified
Commit
3c4f437c
authored
Aug 15, 2018
by
Gennadiy Civil
Committed by
GitHub
Aug 15, 2018
Browse files
Merge branch 'master' into master
parents
87a37c60
997d343d
Changes
174
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
49 additions
and
66 deletions
+49
-66
googlemock/CMakeLists.txt
googlemock/CMakeLists.txt
+3
-3
googlemock/include/gmock/gmock-actions.h
googlemock/include/gmock/gmock-actions.h
+1
-2
googlemock/include/gmock/gmock-cardinalities.h
googlemock/include/gmock/gmock-cardinalities.h
+1
-2
googlemock/include/gmock/gmock-generated-actions.h
googlemock/include/gmock/gmock-generated-actions.h
+6
-12
googlemock/include/gmock/gmock-generated-actions.h.pump
googlemock/include/gmock/gmock-generated-actions.h.pump
+2
-4
googlemock/include/gmock/gmock-generated-function-mockers.h
googlemock/include/gmock/gmock-generated-function-mockers.h
+1
-2
googlemock/include/gmock/gmock-generated-function-mockers.h.pump
...ock/include/gmock/gmock-generated-function-mockers.h.pump
+1
-2
googlemock/include/gmock/gmock-generated-nice-strict.h
googlemock/include/gmock/gmock-generated-nice-strict.h
+1
-2
googlemock/include/gmock/gmock-generated-nice-strict.h.pump
googlemock/include/gmock/gmock-generated-nice-strict.h.pump
+1
-2
googlemock/include/gmock/gmock-matchers.h
googlemock/include/gmock/gmock-matchers.h
+4
-5
googlemock/include/gmock/gmock-more-actions.h
googlemock/include/gmock/gmock-more-actions.h
+1
-2
googlemock/include/gmock/gmock-more-matchers.h
googlemock/include/gmock/gmock-more-matchers.h
+1
-2
googlemock/include/gmock/gmock-spec-builders.h
googlemock/include/gmock/gmock-spec-builders.h
+3
-4
googlemock/include/gmock/gmock.h
googlemock/include/gmock/gmock.h
+1
-2
googlemock/include/gmock/internal/custom/README.md
googlemock/include/gmock/internal/custom/README.md
+16
-0
googlemock/include/gmock/internal/custom/gmock-matchers.h
googlemock/include/gmock/internal/custom/gmock-matchers.h
+1
-3
googlemock/include/gmock/internal/custom/gmock-port.h
googlemock/include/gmock/internal/custom/gmock-port.h
+1
-10
googlemock/include/gmock/internal/gmock-generated-internal-utils.h
...k/include/gmock/internal/gmock-generated-internal-utils.h
+1
-2
googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump
...lude/gmock/internal/gmock-generated-internal-utils.h.pump
+1
-2
googlemock/include/gmock/internal/gmock-internal-utils.h
googlemock/include/gmock/internal/gmock-internal-utils.h
+2
-3
No files found.
googlemock/CMakeLists.txt
View file @
3c4f437c
...
...
@@ -128,13 +128,13 @@ if(INSTALL_GMOCK)
# configure and install pkgconfig files
configure_file
(
cmake/gmock.pc.in
"
${
CMAKE
_BINARY_DIR
}
/gmock.pc"
"
${
gmock
_BINARY_DIR
}
/gmock.pc"
@ONLY
)
configure_file
(
cmake/gmock_main.pc.in
"
${
CMAKE
_BINARY_DIR
}
/gmock_main.pc"
"
${
gmock
_BINARY_DIR
}
/gmock_main.pc"
@ONLY
)
install
(
FILES
"
${
CMAKE
_BINARY_DIR
}
/gmock.pc"
"
${
CMAKE
_BINARY_DIR
}
/gmock_main.pc"
install
(
FILES
"
${
gmock
_BINARY_DIR
}
/gmock.pc"
"
${
gmock
_BINARY_DIR
}
/gmock_main.pc"
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
/pkgconfig"
)
endif
()
...
...
googlemock/include/gmock/gmock-actions.h
View file @
3c4f437c
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
googlemock/include/gmock/gmock-cardinalities.h
View file @
3c4f437c
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
googlemock/include/gmock/gmock-generated-actions.h
View file @
3c4f437c
...
...
@@ -30,8 +30,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
@@ -215,8 +214,7 @@ class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6> > {
get
<
2
>
(
args
),
get
<
3
>
(
args
),
get
<
4
>
(
args
),
get
<
5
>
(
args
));
}
// There is no InvokeCallback() for 6-tuples, as google3 callbacks
// support 5 arguments at most.
// There is no InvokeCallback() for 6-tuples
};
template
<
typename
R
,
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
...
...
@@ -240,8 +238,7 @@ class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> > {
get
<
6
>
(
args
));
}
// There is no InvokeCallback() for 7-tuples, as google3 callbacks
// support 5 arguments at most.
// There is no InvokeCallback() for 7-tuples
};
template
<
typename
R
,
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
...
...
@@ -266,8 +263,7 @@ class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
get
<
6
>
(
args
),
get
<
7
>
(
args
));
}
// There is no InvokeCallback() for 8-tuples, as google3 callbacks
// support 5 arguments at most.
// There is no InvokeCallback() for 8-tuples
};
template
<
typename
R
,
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
...
...
@@ -292,8 +288,7 @@ class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
get
<
6
>
(
args
),
get
<
7
>
(
args
),
get
<
8
>
(
args
));
}
// There is no InvokeCallback() for 9-tuples, as google3 callbacks
// support 5 arguments at most.
// There is no InvokeCallback() for 9-tuples
};
template
<
typename
R
,
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
...
...
@@ -320,8 +315,7 @@ class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
get
<
6
>
(
args
),
get
<
7
>
(
args
),
get
<
8
>
(
args
),
get
<
9
>
(
args
));
}
// There is no InvokeCallback() for 10-tuples, as google3 callbacks
// support 5 arguments at most.
// There is no InvokeCallback() for 10-tuples
};
// Implements the Invoke(callback) action.
...
...
googlemock/include/gmock/gmock-generated-actions.h.pump
View file @
3c4f437c
...
...
@@ -32,8 +32,7 @@ $$}} This meta comment fixes auto-indentation in editors.
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
@@ -88,8 +87,7 @@ $if i <= max_callback_arity [[
return
callback
->
Run
(
$
gets
);
}
]]
$
else
[[
// There is no InvokeCallback() for $i-tuples, as google3 callbacks
// support $max_callback_arity arguments at most.
// There is no InvokeCallback() for $i-tuples
]]
};
...
...
googlemock/include/gmock/gmock-generated-function-mockers.h
View file @
3c4f437c
...
...
@@ -30,8 +30,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
googlemock/include/gmock/gmock-generated-function-mockers.h.pump
View file @
3c4f437c
...
...
@@ -31,8 +31,7 @@ $var n = 10 $$ The maximum arity we support.
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
googlemock/include/gmock/gmock-generated-nice-strict.h
View file @
3c4f437c
...
...
@@ -30,8 +30,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Implements class templates NiceMock, NaggyMock, and StrictMock.
//
...
...
googlemock/include/gmock/gmock-generated-nice-strict.h.pump
View file @
3c4f437c
...
...
@@ -31,8 +31,7 @@ $var n = 10 $$ The maximum arity we support.
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Implements class templates NiceMock, NaggyMock, and StrictMock.
//
...
...
googlemock/include/gmock/gmock-matchers.h
View file @
3c4f437c
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
@@ -74,7 +73,7 @@ namespace testing {
// MatchResultListener is an abstract class. Its << operator can be
// used by a matcher to explain why a value matches or doesn't match.
//
//
TODO(wan@google.com)
: add method
//
FIXME
: add method
// bool InterestedInWhy(bool result) const;
// to indicate whether the listener is interested in why the match
// result is 'result'.
...
...
@@ -923,7 +922,7 @@ class TuplePrefix {
GTEST_REFERENCE_TO_CONST_
(
Value
)
value
=
get
<
N
-
1
>
(
values
);
StringMatchResultListener
listener
;
if
(
!
matcher
.
MatchAndExplain
(
value
,
&
listener
))
{
//
TODO(wan)
: include in the message the name of the parameter
//
FIXME
: include in the message the name of the parameter
// as used in MOCK_METHOD*() when possible.
*
os
<<
" Expected arg #"
<<
N
-
1
<<
": "
;
get
<
N
-
1
>
(
matchers
).
DescribeTo
(
os
);
...
...
@@ -2421,7 +2420,7 @@ class WhenDynamicCastToMatcher : public WhenDynamicCastToMatcherBase<To> {
template
<
typename
From
>
bool
MatchAndExplain
(
From
from
,
MatchResultListener
*
listener
)
const
{
//
TODO(sbenza)
: Add more detail on failures. ie did the dyn_cast fail?
//
FIXME
: Add more detail on failures. ie did the dyn_cast fail?
To
to
=
dynamic_cast
<
To
>
(
from
);
return
MatchPrintAndExplain
(
to
,
this
->
matcher_
,
listener
);
}
...
...
googlemock/include/gmock/gmock-more-actions.h
View file @
3c4f437c
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
googlemock/include/gmock/gmock-more-matchers.h
View file @
3c4f437c
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: marcus.boerger@google.com (Marcus Boerger)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
googlemock/include/gmock/gmock-spec-builders.h
View file @
3c4f437c
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
@@ -185,7 +184,7 @@ class GTEST_API_ UntypedFunctionMockerBase {
// this information in the global mock registry. Will be called
// whenever an EXPECT_CALL() or ON_CALL() is executed on this mock
// method.
//
TODO(wan@google.com)
: rename to SetAndRegisterOwner().
//
FIXME
: rename to SetAndRegisterOwner().
void
RegisterOwner
(
const
void
*
mock_obj
)
GTEST_LOCK_EXCLUDED_
(
g_gmock_mutex
);
...
...
@@ -1208,7 +1207,7 @@ class TypedExpectation : public ExpectationBase {
mocker
->
DescribeDefaultActionTo
(
args
,
what
);
DescribeCallCountTo
(
why
);
//
TODO(wan@google.com)
: allow the user to control whether
//
FIXME
: allow the user to control whether
// unexpected calls should fail immediately or continue using a
// flag --gmock_unexpected_calls_are_fatal.
return
NULL
;
...
...
googlemock/include/gmock/gmock.h
View file @
3c4f437c
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
googlemock/include/gmock/internal/custom/README.md
0 → 100644
View file @
3c4f437c
# Customization Points
The custom directory is an injection point for custom user configurations.
## Header `gmock-port.h`
The following macros can be defined:
### Flag related macros:
*
`GMOCK_DECLARE_bool_(name)`
*
`GMOCK_DECLARE_int32_(name)`
*
`GMOCK_DECLARE_string_(name)`
*
`GMOCK_DEFINE_bool_(name, default_val, doc)`
*
`GMOCK_DEFINE_int32_(name, default_val, doc)`
*
`GMOCK_DEFINE_string_(name, default_val, doc)`
googlemock/include/gmock/internal/custom/gmock-matchers.h
View file @
3c4f437c
...
...
@@ -27,9 +27,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ============================================================
// An installation-specific extension point for gmock-matchers.h.
// ============================================================
// Injection point for custom user configurations. See README for details
//
// GOOGLETEST_CM0002 DO NOT DELETE
...
...
googlemock/include/gmock/internal/custom/gmock-port.h
View file @
3c4f437c
...
...
@@ -27,16 +27,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Injection point for custom user configurations.
// The following macros can be defined:
//
// Flag related macros:
// GMOCK_DECLARE_bool_(name)
// GMOCK_DECLARE_int32_(name)
// GMOCK_DECLARE_string_(name)
// GMOCK_DEFINE_bool_(name, default_val, doc)
// GMOCK_DEFINE_int32_(name, default_val, doc)
// GMOCK_DEFINE_string_(name, default_val, doc)
// Injection point for custom user configurations. See README for details
//
// ** Custom implementation starts here **
...
...
googlemock/include/gmock/internal/gmock-generated-internal-utils.h
View file @
3c4f437c
...
...
@@ -30,8 +30,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump
View file @
3c4f437c
...
...
@@ -31,8 +31,7 @@ $var n = 10 $$ The maximum arity we support.
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
googlemock/include/gmock/internal/gmock-internal-utils.h
View file @
3c4f437c
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
@@ -361,7 +360,7 @@ class WithoutMatchers {
// Internal use only: access the singleton instance of WithoutMatchers.
GTEST_API_
WithoutMatchers
GetWithoutMatchers
();
//
TODO(wan@google.com)
: group all type utilities together.
//
FIXME
: group all type utilities together.
// Type traits.
...
...
Prev
1
2
3
4
5
…
9
Next
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