summaryrefslogtreecommitdiffstats
path: root/googlemock/test
diff options
context:
space:
mode:
Diffstat (limited to 'googlemock/test')
-rw-r--r--googlemock/test/gmock-actions_test.cc57
-rw-r--r--googlemock/test/gmock-function-mocker_test.cc2
-rw-r--r--googlemock/test/gmock-matchers-comparisons_test.cc108
-rw-r--r--googlemock/test/gmock-more-actions_test.cc34
-rw-r--r--googlemock/test/gmock-spec-builders_test.cc2
-rw-r--r--googlemock/test/gmock_output_test_golden.txt8
6 files changed, 149 insertions, 62 deletions
diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc
index 46b0e91..9751705 100644
--- a/googlemock/test/gmock-actions_test.cc
+++ b/googlemock/test/gmock-actions_test.cc
@@ -188,7 +188,7 @@ TEST(TypeTraits, IsInvocableRV) {
struct C {
int operator()() const { return 0; }
void operator()(int) & {}
- std::string operator()(int) && { return ""; };
+ std::string operator()(int) && { return ""; }
};
// The first overload is callable for const and non-const rvalues and lvalues.
@@ -1030,8 +1030,7 @@ void VoidFunc(bool /* flag */) {}
TEST(DoDefaultDeathTest, DiesIfUsedInCompositeAction) {
MockClass mock;
- EXPECT_CALL(mock, IntFunc(_))
- .WillRepeatedly(DoAll(Invoke(VoidFunc), DoDefault()));
+ EXPECT_CALL(mock, IntFunc(_)).WillRepeatedly(DoAll(VoidFunc, DoDefault()));
// Ideally we should verify the error message as well. Sadly,
// EXPECT_DEATH() can only capture stderr, while Google Mock's
@@ -1282,7 +1281,7 @@ int ReturnOne() {
TEST(IgnoreResultTest, MonomorphicAction) {
g_done = false;
- Action<void()> a = IgnoreResult(Invoke(ReturnOne));
+ Action<void()> a = IgnoreResult(&ReturnOne);
a.Perform(std::make_tuple());
EXPECT_TRUE(g_done);
}
@@ -1297,7 +1296,7 @@ MyNonDefaultConstructible ReturnMyNonDefaultConstructible(double /* x */) {
TEST(IgnoreResultTest, ActionReturningClass) {
g_done = false;
Action<void(int)> a =
- IgnoreResult(Invoke(ReturnMyNonDefaultConstructible)); // NOLINT
+ IgnoreResult(&ReturnMyNonDefaultConstructible); // NOLINT
a.Perform(std::make_tuple(2));
EXPECT_TRUE(g_done);
}
@@ -1477,12 +1476,15 @@ TEST(DoAll, SupportsTypeErasedActions) {
}
}
-// A DoAll action should be convertible to a OnceAction, even when its component
-// sub-actions are user-provided types that define only an Action conversion
-// operator. If they supposed being called more than once then they also support
-// being called at most once.
+// A multi-action DoAll action should be convertible to a OnceAction, even when
+// its component sub-actions are user-provided types that define only an Action
+// conversion operator. If they supposed being called more than once then they
+// also support being called at most once.
+//
+// Single-arg DoAll just returns its argument, so will prefer the Action<F>
+// overload for WillOnce.
TEST(DoAll, ConvertibleToOnceActionWithUserProvidedActionConversion) {
- // Simplest case: only one sub-action.
+ // Final action.
struct CustomFinal final {
operator Action<int()>() { // NOLINT
return Return(17);
@@ -1493,17 +1495,7 @@ TEST(DoAll, ConvertibleToOnceActionWithUserProvidedActionConversion) {
}
};
- {
- OnceAction<int()> action = DoAll(CustomFinal{});
- EXPECT_EQ(17, std::move(action).Call());
- }
-
- {
- OnceAction<int(int, char)> action = DoAll(CustomFinal{});
- EXPECT_EQ(19, std::move(action).Call(0, 0));
- }
-
- // It should also work with multiple sub-actions.
+ // Sub-actions.
struct CustomInitial final {
operator Action<void()>() { // NOLINT
return [] {};
@@ -1527,7 +1519,7 @@ TEST(DoAll, ConvertibleToOnceActionWithUserProvidedActionConversion) {
// Tests using WithArgs and with an action that takes 1 argument.
TEST(WithArgsTest, OneArg) {
- Action<bool(double x, int n)> a = WithArgs<1>(Invoke(Unary)); // NOLINT
+ Action<bool(double x, int n)> a = WithArgs<1>(Unary);
EXPECT_TRUE(a.Perform(std::make_tuple(1.5, -1)));
EXPECT_FALSE(a.Perform(std::make_tuple(1.5, 1)));
}
@@ -1535,7 +1527,7 @@ TEST(WithArgsTest, OneArg) {
// Tests using WithArgs with an action that takes 2 arguments.
TEST(WithArgsTest, TwoArgs) {
Action<const char*(const char* s, double x, short n)> a = // NOLINT
- WithArgs<0, 2>(Invoke(Binary));
+ WithArgs<0, 2>(Binary);
const char s[] = "Hello";
EXPECT_EQ(s + 2, a.Perform(std::make_tuple(CharPtr(s), 0.5, Short(2))));
}
@@ -1551,7 +1543,7 @@ struct ConcatAll {
// Tests using WithArgs with an action that takes 10 arguments.
TEST(WithArgsTest, TenArgs) {
Action<std::string(const char*, const char*, const char*, const char*)> a =
- WithArgs<0, 1, 2, 3, 2, 1, 0, 1, 2, 3>(Invoke(ConcatAll{}));
+ WithArgs<0, 1, 2, 3, 2, 1, 0, 1, 2, 3>(ConcatAll{});
EXPECT_EQ("0123210123",
a.Perform(std::make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
CharPtr("3"))));
@@ -1576,21 +1568,21 @@ TEST(WithArgsTest, NonInvokeAction) {
// Tests using WithArgs to pass all original arguments in the original order.
TEST(WithArgsTest, Identity) {
Action<int(int x, char y, short z)> a = // NOLINT
- WithArgs<0, 1, 2>(Invoke(Ternary));
+ WithArgs<0, 1, 2>(Ternary);
EXPECT_EQ(123, a.Perform(std::make_tuple(100, Char(20), Short(3))));
}
// Tests using WithArgs with repeated arguments.
TEST(WithArgsTest, RepeatedArguments) {
Action<int(bool, int m, int n)> a = // NOLINT
- WithArgs<1, 1, 1, 1>(Invoke(SumOf4));
+ WithArgs<1, 1, 1, 1>(SumOf4);
EXPECT_EQ(4, a.Perform(std::make_tuple(false, 1, 10)));
}
// Tests using WithArgs with reversed argument order.
TEST(WithArgsTest, ReversedArgumentOrder) {
Action<const char*(short n, const char* input)> a = // NOLINT
- WithArgs<1, 0>(Invoke(Binary));
+ WithArgs<1, 0>(Binary);
const char s[] = "Hello";
EXPECT_EQ(s + 2, a.Perform(std::make_tuple(Short(2), CharPtr(s))));
}
@@ -1598,14 +1590,14 @@ TEST(WithArgsTest, ReversedArgumentOrder) {
// Tests using WithArgs with compatible, but not identical, argument types.
TEST(WithArgsTest, ArgsOfCompatibleTypes) {
Action<long(short x, char y, double z, char c)> a = // NOLINT
- WithArgs<0, 1, 3>(Invoke(Ternary));
+ WithArgs<0, 1, 3>(Ternary);
EXPECT_EQ(123,
a.Perform(std::make_tuple(Short(100), Char(20), 5.6, Char(3))));
}
// Tests using WithArgs with an action that returns void.
TEST(WithArgsTest, VoidAction) {
- Action<void(double x, char c, int n)> a = WithArgs<2, 1>(Invoke(VoidBinary));
+ Action<void(double x, char c, int n)> a = WithArgs<2, 1>(VoidBinary);
g_done = false;
a.Perform(std::make_tuple(1.5, 'a', 3));
EXPECT_TRUE(g_done);
@@ -1872,9 +1864,8 @@ TEST(MockMethodTest, CanReturnMoveOnlyValue_Invoke) {
[] { return std::make_unique<int>(42); });
EXPECT_EQ(42, *mock.MakeUnique());
- EXPECT_CALL(mock, MakeUnique()).WillRepeatedly(Invoke(UniquePtrSource));
- EXPECT_CALL(mock, MakeVectorUnique())
- .WillRepeatedly(Invoke(VectorUniquePtrSource));
+ EXPECT_CALL(mock, MakeUnique()).WillRepeatedly(UniquePtrSource);
+ EXPECT_CALL(mock, MakeVectorUnique()).WillRepeatedly(VectorUniquePtrSource);
std::unique_ptr<int> result1 = mock.MakeUnique();
EXPECT_EQ(19, *result1);
std::unique_ptr<int> result2 = mock.MakeUnique();
@@ -1896,7 +1887,7 @@ TEST(MockMethodTest, CanTakeMoveOnlyValue) {
});
// DoAll() does not compile, since it would move from its arguments twice.
// EXPECT_CALL(mock, TakeUnique(_, _))
- // .WillRepeatedly(DoAll(Invoke([](std::unique_ptr<int> j) {}),
+ // .WillRepeatedly(DoAll([](std::unique_ptr<int> j) {})),
// Return(1)));
EXPECT_CALL(mock, TakeUnique(testing::Pointee(7)))
.WillOnce(Return(-7))
diff --git a/googlemock/test/gmock-function-mocker_test.cc b/googlemock/test/gmock-function-mocker_test.cc
index cdac79b..c3719f9 100644
--- a/googlemock/test/gmock-function-mocker_test.cc
+++ b/googlemock/test/gmock-function-mocker_test.cc
@@ -91,7 +91,7 @@ class FooInterface {
virtual bool TakesNonConstReference(int& n) = 0; // NOLINT
virtual std::string TakesConstReference(const int& n) = 0;
- virtual bool TakesConst(const int x) = 0;
+ virtual bool TakesConst(int x) = 0;
virtual int OverloadedOnArgumentNumber() = 0;
virtual int OverloadedOnArgumentNumber(int n) = 0;
diff --git a/googlemock/test/gmock-matchers-comparisons_test.cc b/googlemock/test/gmock-matchers-comparisons_test.cc
index a331aec..413c2bb 100644
--- a/googlemock/test/gmock-matchers-comparisons_test.cc
+++ b/googlemock/test/gmock-matchers-comparisons_test.cc
@@ -33,6 +33,7 @@
#include <functional>
#include <memory>
+#include <optional>
#include <string>
#include <tuple>
#include <vector>
@@ -621,15 +622,42 @@ struct IntReferenceWrapper {
const int* value;
};
+// Compared the contained values
bool operator==(const IntReferenceWrapper& a, const IntReferenceWrapper& b) {
- return a.value == b.value;
+ return *a.value == *b.value;
}
-TEST(MatcherCastTest, ValueIsNotCopied) {
- int n = 42;
- Matcher<IntReferenceWrapper> m = MatcherCast<IntReferenceWrapper>(n);
- // Verify that the matcher holds a reference to n, not to its temporary copy.
- EXPECT_TRUE(m.Matches(n));
+TEST(MatcherCastTest, ValueIsCopied) {
+ {
+ // When an IntReferenceWrapper is passed.
+ int n = 42;
+ Matcher<IntReferenceWrapper> m =
+ MatcherCast<IntReferenceWrapper>(IntReferenceWrapper(n));
+ {
+ int value = 42;
+ EXPECT_TRUE(m.Matches(value));
+ value = 10;
+ EXPECT_FALSE(m.Matches(value));
+ // This changes the stored reference.
+ n = 10;
+ EXPECT_TRUE(m.Matches(value));
+ }
+ }
+
+ {
+ // When an int is passed.
+ int n = 42;
+ Matcher<IntReferenceWrapper> m = MatcherCast<IntReferenceWrapper>(n);
+ {
+ int value = 42;
+ EXPECT_TRUE(m.Matches(value));
+ value = 10;
+ EXPECT_FALSE(m.Matches(value));
+ // This does not change the stored int.
+ n = 10;
+ EXPECT_FALSE(m.Matches(value));
+ }
+ }
}
class Base {
@@ -2396,6 +2424,74 @@ TEST(ExplainMatchResultTest, AllOf_True_True_2) {
EXPECT_EQ("is >= 2, and is <= 3", Explain(m, 2));
}
+// A matcher that records whether the listener was interested.
+template <typename T>
+class CountingMatcher : public MatcherInterface<T> {
+ public:
+ explicit CountingMatcher(const Matcher<T>& base_matcher,
+ std::vector<bool>* listener_interested)
+ : base_matcher_(base_matcher),
+ listener_interested_(listener_interested) {}
+
+ bool MatchAndExplain(T x, MatchResultListener* listener) const override {
+ listener_interested_->push_back(listener->IsInterested());
+ return base_matcher_.MatchAndExplain(x, listener);
+ }
+
+ void DescribeTo(ostream* os) const override { base_matcher_.DescribeTo(os); }
+
+ private:
+ Matcher<T> base_matcher_;
+ std::vector<bool>* listener_interested_;
+};
+
+TEST(AllOfTest, DoesNotFormatChildMatchersWhenNotInterested) {
+ std::vector<bool> listener_interested;
+ Matcher<int> matcher =
+ MakeMatcher(new CountingMatcher<int>(Eq(1), &listener_interested));
+ EXPECT_TRUE(matcher.Matches(1));
+ EXPECT_THAT(listener_interested, ElementsAre(false));
+ listener_interested.clear();
+ Matcher<int> all_of_matcher = AllOf(matcher, matcher);
+ EXPECT_TRUE(all_of_matcher.Matches(1));
+ EXPECT_THAT(listener_interested, ElementsAre(false, false));
+ listener_interested.clear();
+ EXPECT_FALSE(all_of_matcher.Matches(0));
+ EXPECT_THAT(listener_interested, ElementsAre(false));
+}
+
+TEST(AnyOfTest, DoesNotFormatChildMatchersWhenNotInterested) {
+ std::vector<bool> listener_interested;
+ Matcher<int> matcher =
+ MakeMatcher(new CountingMatcher<int>(Eq(1), &listener_interested));
+ EXPECT_TRUE(matcher.Matches(1));
+ EXPECT_THAT(listener_interested, ElementsAre(false));
+ listener_interested.clear();
+ Matcher<int> any_of_matcher = AnyOf(matcher, matcher);
+ EXPECT_TRUE(any_of_matcher.Matches(1));
+ EXPECT_THAT(listener_interested, ElementsAre(false));
+ listener_interested.clear();
+ EXPECT_FALSE(any_of_matcher.Matches(0));
+ EXPECT_THAT(listener_interested, ElementsAre(false, false));
+}
+
+TEST(OptionalTest, DoesNotFormatChildMatcherWhenNotInterested) {
+ std::vector<bool> listener_interested;
+ Matcher<int> matcher =
+ MakeMatcher(new CountingMatcher<int>(Eq(1), &listener_interested));
+ EXPECT_TRUE(matcher.Matches(1));
+ EXPECT_THAT(listener_interested, ElementsAre(false));
+ listener_interested.clear();
+ Matcher<std::optional<int>> optional_matcher = Optional(matcher);
+ EXPECT_FALSE(optional_matcher.Matches(std::nullopt));
+ EXPECT_THAT(listener_interested, ElementsAre());
+ EXPECT_TRUE(optional_matcher.Matches(1));
+ EXPECT_THAT(listener_interested, ElementsAre(false));
+ listener_interested.clear();
+ EXPECT_FALSE(matcher.Matches(0));
+ EXPECT_THAT(listener_interested, ElementsAre(false));
+}
+
INSTANTIATE_GTEST_MATCHER_TEST_P(ExplainmatcherResultTest);
TEST_P(ExplainmatcherResultTestP, MonomorphicMatcher) {
diff --git a/googlemock/test/gmock-more-actions_test.cc b/googlemock/test/gmock-more-actions_test.cc
index 5b8b566..7c44eb0 100644
--- a/googlemock/test/gmock-more-actions_test.cc
+++ b/googlemock/test/gmock-more-actions_test.cc
@@ -202,45 +202,45 @@ class Foo {
// Tests using Invoke() with a nullary function.
TEST(InvokeTest, Nullary) {
- Action<int()> a = Invoke(Nullary); // NOLINT
+ Action<int()> a = &Nullary;
EXPECT_EQ(1, a.Perform(std::make_tuple()));
}
// Tests using Invoke() with a unary function.
TEST(InvokeTest, Unary) {
- Action<bool(int)> a = Invoke(Unary); // NOLINT
+ Action<bool(int)> a = &Unary;
EXPECT_FALSE(a.Perform(std::make_tuple(1)));
EXPECT_TRUE(a.Perform(std::make_tuple(-1)));
}
// Tests using Invoke() with a binary function.
TEST(InvokeTest, Binary) {
- Action<const char*(const char*, short)> a = Invoke(Binary); // NOLINT
+ Action<const char*(const char*, short)> a = &Binary; // NOLINT
const char* p = "Hello";
EXPECT_EQ(p + 2, a.Perform(std::make_tuple(p, Short(2))));
}
// Tests using Invoke() with a ternary function.
TEST(InvokeTest, Ternary) {
- Action<int(int, char, short)> a = Invoke(Ternary); // NOLINT
+ Action<int(int, char, short)> a = &Ternary; // NOLINT
EXPECT_EQ(6, a.Perform(std::make_tuple(1, '\2', Short(3))));
}
// Tests using Invoke() with a 4-argument function.
TEST(InvokeTest, FunctionThatTakes4Arguments) {
- Action<int(int, int, int, int)> a = Invoke(SumOf4); // NOLINT
+ Action<int(int, int, int, int)> a = &SumOf4;
EXPECT_EQ(1234, a.Perform(std::make_tuple(1000, 200, 30, 4)));
}
// Tests using Invoke() with a 5-argument function.
TEST(InvokeTest, FunctionThatTakes5Arguments) {
- Action<int(int, int, int, int, int)> a = Invoke(SumOf5); // NOLINT
+ Action<int(int, int, int, int, int)> a = &SumOf5;
EXPECT_EQ(12345, a.Perform(std::make_tuple(10000, 2000, 300, 40, 5)));
}
// Tests using Invoke() with a 6-argument function.
TEST(InvokeTest, FunctionThatTakes6Arguments) {
- Action<int(int, int, int, int, int, int)> a = Invoke(SumOf6); // NOLINT
+ Action<int(int, int, int, int, int, int)> a = &SumOf6;
EXPECT_EQ(123456,
a.Perform(std::make_tuple(100000, 20000, 3000, 400, 50, 6)));
}
@@ -253,7 +253,7 @@ inline const char* CharPtr(const char* s) { return s; }
TEST(InvokeTest, FunctionThatTakes7Arguments) {
Action<std::string(const char*, const char*, const char*, const char*,
const char*, const char*, const char*)>
- a = Invoke(Concat7);
+ a = &Concat7;
EXPECT_EQ("1234567",
a.Perform(std::make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
CharPtr("4"), CharPtr("5"), CharPtr("6"),
@@ -264,7 +264,7 @@ TEST(InvokeTest, FunctionThatTakes7Arguments) {
TEST(InvokeTest, FunctionThatTakes8Arguments) {
Action<std::string(const char*, const char*, const char*, const char*,
const char*, const char*, const char*, const char*)>
- a = Invoke(Concat8);
+ a = &Concat8;
EXPECT_EQ("12345678",
a.Perform(std::make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
CharPtr("4"), CharPtr("5"), CharPtr("6"),
@@ -276,7 +276,7 @@ TEST(InvokeTest, FunctionThatTakes9Arguments) {
Action<std::string(const char*, const char*, const char*, const char*,
const char*, const char*, const char*, const char*,
const char*)>
- a = Invoke(Concat9);
+ a = &Concat9;
EXPECT_EQ("123456789", a.Perform(std::make_tuple(
CharPtr("1"), CharPtr("2"), CharPtr("3"),
CharPtr("4"), CharPtr("5"), CharPtr("6"),
@@ -288,7 +288,7 @@ TEST(InvokeTest, FunctionThatTakes10Arguments) {
Action<std::string(const char*, const char*, const char*, const char*,
const char*, const char*, const char*, const char*,
const char*, const char*)>
- a = Invoke(Concat10);
+ a = &Concat10;
EXPECT_EQ("1234567890",
a.Perform(std::make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
CharPtr("4"), CharPtr("5"), CharPtr("6"),
@@ -298,12 +298,12 @@ TEST(InvokeTest, FunctionThatTakes10Arguments) {
// Tests using Invoke() with functions with parameters declared as Unused.
TEST(InvokeTest, FunctionWithUnusedParameters) {
- Action<int(int, int, double, const std::string&)> a1 = Invoke(SumOfFirst2);
+ Action<int(int, int, double, const std::string&)> a1 = &SumOfFirst2;
std::tuple<int, int, double, std::string> dummy =
std::make_tuple(10, 2, 5.6, std::string("hi"));
EXPECT_EQ(12, a1.Perform(dummy));
- Action<int(int, int, bool, int*)> a2 = Invoke(SumOfFirst2);
+ Action<int(int, int, bool, int*)> a2 = &SumOfFirst2;
EXPECT_EQ(
23, a2.Perform(std::make_tuple(20, 3, true, static_cast<int*>(nullptr))));
}
@@ -320,13 +320,13 @@ TEST(InvokeTest, MethodWithUnusedParameters) {
// Tests using Invoke() with a functor.
TEST(InvokeTest, Functor) {
- Action<long(long, int)> a = Invoke(plus<long>()); // NOLINT
+ Action<long(long, int)> a = plus<long>(); // NOLINT
EXPECT_EQ(3L, a.Perform(std::make_tuple(1, 2)));
}
// Tests using Invoke(f) as an action of a compatible type.
TEST(InvokeTest, FunctionWithCompatibleType) {
- Action<long(int, short, char, bool)> a = Invoke(SumOf4); // NOLINT
+ Action<long(int, short, char, bool)> a = &SumOf4; // NOLINT
EXPECT_EQ(4321, a.Perform(std::make_tuple(4000, Short(300), Char(20), true)));
}
@@ -447,13 +447,13 @@ TEST(InvokeMethodTest, MethodWithCompatibleType) {
// Tests using WithoutArgs with an action that takes no argument.
TEST(WithoutArgsTest, NoArg) {
- Action<int(int n)> a = WithoutArgs(Invoke(Nullary)); // NOLINT
+ Action<int(int n)> a = WithoutArgs(&Nullary); // NOLINT
EXPECT_EQ(1, a.Perform(std::make_tuple(2)));
}
// Tests using WithArg with an action that takes 1 argument.
TEST(WithArgTest, OneArg) {
- Action<bool(double x, int n)> b = WithArg<1>(Invoke(Unary)); // NOLINT
+ Action<bool(double x, int n)> b = WithArg<1>(&Unary); // NOLINT
EXPECT_TRUE(b.Perform(std::make_tuple(1.5, -1)));
EXPECT_FALSE(b.Perform(std::make_tuple(1.5, 1)));
}
diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc
index 9e68aa0..90f00c2 100644
--- a/googlemock/test/gmock-spec-builders_test.cc
+++ b/googlemock/test/gmock-spec-builders_test.cc
@@ -2045,7 +2045,7 @@ class GMockVerboseFlagTest : public VerboseFlagPreservingFixture {
NaggyMock<MockA> a;
const std::string note =
"NOTE: You can safely ignore the above warning unless this "
- "call should not happen. Do not suppress it by blindly adding "
+ "call should not happen. Do not suppress it by adding "
"an EXPECT_CALL() if you don't mean to enforce the call. "
"See "
"https://github.com/google/googletest/blob/main/docs/"
diff --git a/googlemock/test/gmock_output_test_golden.txt b/googlemock/test/gmock_output_test_golden.txt
index ca88af0..4b47f33 100644
--- a/googlemock/test/gmock_output_test_golden.txt
+++ b/googlemock/test/gmock_output_test_golden.txt
@@ -79,14 +79,14 @@ GMOCK WARNING:
Uninteresting mock function call - returning default value.
Function call: Bar2(0, 1)
Returns: false
-NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details.
+NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details.
[ OK ] GMockOutputTest.UninterestingCall
[ RUN ] GMockOutputTest.UninterestingCallToVoidFunction
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: Bar3(0, 1)
-NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details.
+NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details.
[ OK ] GMockOutputTest.UninterestingCallToVoidFunction
[ RUN ] GMockOutputTest.RetiredExpectation
unknown file: Failure
@@ -283,14 +283,14 @@ Uninteresting mock function call - taking default action specified at:
FILE:#:
Function call: Bar2(2, 2)
Returns: true
-NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details.
+NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details.
GMOCK WARNING:
Uninteresting mock function call - taking default action specified at:
FILE:#:
Function call: Bar2(1, 1)
Returns: false
-NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details.
+NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details.
[ OK ] GMockOutputTest.UninterestingCallWithDefaultAction
[ RUN ] GMockOutputTest.ExplicitActionsRunOutWithDefaultAction