mirror of
https://github.com/google/googletest.git
synced 2024-12-28 19:15:24 +08:00
Merge branch 'master' into relocatable-pkgconfig-fix
This commit is contained in:
commit
2c19680bf9
@ -1184,9 +1184,10 @@ class TypedExpectation : public ExpectationBase {
|
||||
Log(kWarning, ss.str(), 1);
|
||||
}
|
||||
|
||||
return count <= action_count ?
|
||||
*static_cast<const Action<F>*>(untyped_actions_[count - 1]) :
|
||||
repeated_action();
|
||||
return count <= action_count
|
||||
? *static_cast<const Action<F>*>(
|
||||
untyped_actions_[static_cast<size_t>(count - 1)])
|
||||
: repeated_action();
|
||||
}
|
||||
|
||||
// Given the arguments of a mock function call, if the call will
|
||||
@ -1762,12 +1763,12 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
|
||||
::std::ostream* why) const
|
||||
GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
|
||||
g_gmock_mutex.AssertHeld();
|
||||
const int count = static_cast<int>(untyped_expectations_.size());
|
||||
const size_t count = untyped_expectations_.size();
|
||||
*why << "Google Mock tried the following " << count << " "
|
||||
<< (count == 1 ? "expectation, but it didn't match" :
|
||||
"expectations, but none matched")
|
||||
<< ":\n";
|
||||
for (int i = 0; i < count; i++) {
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
TypedExpectation<F>* const expectation =
|
||||
static_cast<TypedExpectation<F>*>(untyped_expectations_[i].get());
|
||||
*why << "\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user