aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test
diff options
context:
space:
mode:
authorShaindel Schwartz <shaindel@google.com>2019-09-12 12:10:51 -0400
committerShaindel Schwartz <shaindel@google.com>2019-09-12 12:10:51 -0400
commitc7a03daa99e7c457561b5dd2afc0eddab166e48e (patch)
treeef122e5c8d5e0c5239a29f1a56012445f59cb867 /googlemock/test
parentac24edd6e06114818b1a29c99bb81153514f7fb2 (diff)
parent7bd4a7f3e9ae46bb7d99fc5fd5dd1a137496bb6a (diff)
downloadgoogletest-c7a03daa99e7c457561b5dd2afc0eddab166e48e.tar.gz
googletest-c7a03daa99e7c457561b5dd2afc0eddab166e48e.tar.bz2
googletest-c7a03daa99e7c457561b5dd2afc0eddab166e48e.zip
Merge pull request #2387 from kuzkry:iff
PiperOrigin-RevId: 268693457
Diffstat (limited to 'googlemock/test')
-rw-r--r--googlemock/test/gmock-cardinalities_test.cc6
-rw-r--r--googlemock/test/gmock-matchers_test.cc13
-rw-r--r--googlemock/test/gmock-spec-builders_test.cc6
3 files changed, 14 insertions, 11 deletions
diff --git a/googlemock/test/gmock-cardinalities_test.cc b/googlemock/test/gmock-cardinalities_test.cc
index 66042d40..ca97cae2 100644
--- a/googlemock/test/gmock-cardinalities_test.cc
+++ b/googlemock/test/gmock-cardinalities_test.cc
@@ -395,12 +395,14 @@ TEST(ExactlyTest, HasCorrectBounds) {
class EvenCardinality : public CardinalityInterface {
public:
- // Returns true if call_count calls will satisfy this cardinality.
+ // Returns true if and only if call_count calls will satisfy this
+ // cardinality.
bool IsSatisfiedByCallCount(int call_count) const override {
return (call_count % 2 == 0);
}
- // Returns true if call_count calls will saturate this cardinality.
+ // Returns true if and only if call_count calls will saturate this
+ // cardinality.
bool IsSaturatedByCallCount(int /* call_count */) const override {
return false;
}
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc
index a61d040b..88f144d1 100644
--- a/googlemock/test/gmock-matchers_test.cc
+++ b/googlemock/test/gmock-matchers_test.cc
@@ -956,10 +956,9 @@ TEST(TypedEqTest, CanDescribeSelf) {
// Tests that TypedEq<T>(v) has type Matcher<T>.
-// Type<T>::IsTypeOf(v) compiles if the type of value v is T, where T
-// is a "bare" type (i.e. not in the form of const U or U&). If v's
-// type is not T, the compiler will generate a message about
-// "undefined reference".
+// Type<T>::IsTypeOf(v) compiles if and only if the type of value v is T, where
+// T is a "bare" type (i.e. not in the form of const U or U&). If v's type is
+// not T, the compiler will generate a message about "undefined reference".
template <typename T>
struct Type {
static bool IsTypeOf(const T& /* v */) { return true; }
@@ -2640,8 +2639,8 @@ class IsGreaterThan {
// For testing Truly().
const int foo = 0;
-// This predicate returns true if the argument references foo and has
-// a zero value.
+// This predicate returns true if and only if the argument references foo and
+// has a zero value.
bool ReferencesFooAndIsZero(const int& n) {
return (&n == &foo) && (n == 0);
}
@@ -3594,7 +3593,7 @@ class Uncopyable {
GTEST_DISALLOW_COPY_AND_ASSIGN_(Uncopyable);
};
-// Returns true if x.value() is positive.
+// Returns true if and only if x.value() is positive.
bool ValueIsPositive(const Uncopyable& x) { return x.value() > 0; }
MATCHER_P(UncopyableIs, inner_matcher, "") {
diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc
index 95b4b8b7..7bf5a8ad 100644
--- a/googlemock/test/gmock-spec-builders_test.cc
+++ b/googlemock/test/gmock-spec-builders_test.cc
@@ -1952,12 +1952,14 @@ TEST(DeletingMockEarlyTest, Failure2) {
class EvenNumberCardinality : public CardinalityInterface {
public:
- // Returns true if call_count calls will satisfy this cardinality.
+ // Returns true if and only if call_count calls will satisfy this
+ // cardinality.
bool IsSatisfiedByCallCount(int call_count) const override {
return call_count % 2 == 0;
}
- // Returns true if call_count calls will saturate this cardinality.
+ // Returns true if and only if call_count calls will saturate this
+ // cardinality.
bool IsSaturatedByCallCount(int /* call_count */) const override {
return false;
}