diff options
author | Krystian Kuzniarek <krystian.kuzniarek@gmail.com> | 2019-07-26 09:48:08 (GMT) |
---|---|---|
committer | Krystian Kuzniarek <krystian.kuzniarek@gmail.com> | 2019-07-30 10:52:27 (GMT) |
commit | bf6df7eaee5cfaafe2655fab143f348eba98c9af (patch) | |
tree | 0aed71d680339f754feaff8dc96bc642666047e7 | |
parent | 2134e3fd857d952e03ce76064fad5ac6e9036104 (diff) | |
download | googletest-bf6df7eaee5cfaafe2655fab143f348eba98c9af.zip googletest-bf6df7eaee5cfaafe2655fab143f348eba98c9af.tar.gz googletest-bf6df7eaee5cfaafe2655fab143f348eba98c9af.tar.bz2 |
fix typosrefs/pull/2356/head
42 files changed, 228 insertions, 228 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1f0d69c..c6e656e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ accept your pull requests. ## Are you a Googler? -If you are a Googler, plese make an attempt to submit an internal change rather +If you are a Googler, please make an attempt to submit an internal change rather than a GitHub Pull Request. If you are not able to submit an internal change a PR is acceptable as an alternative. diff --git a/googlemock/docs/cheat_sheet.md b/googlemock/docs/cheat_sheet.md index e839fa9..d0b68ce 100644 --- a/googlemock/docs/cheat_sheet.md +++ b/googlemock/docs/cheat_sheet.md @@ -857,12 +857,12 @@ you can do it earlier: using ::testing::Mock; ... // Verifies and removes the expectations on mock_obj; -// returns true iff successful. +// returns true if successful. Mock::VerifyAndClearExpectations(&mock_obj); ... // Verifies and removes the expectations on mock_obj; // also removes the default actions set by ON_CALL(); -// returns true iff successful. +// returns true if successful. Mock::VerifyAndClear(&mock_obj); ``` diff --git a/googlemock/docs/cook_book.md b/googlemock/docs/cook_book.md index a858cd1..ef831a7 100644 --- a/googlemock/docs/cook_book.md +++ b/googlemock/docs/cook_book.md @@ -1037,7 +1037,7 @@ arguments as *one* single tuple to the predicate. Have you noticed that a matcher is just a fancy predicate that also knows how to describe itself? Many existing algorithms take predicates as arguments (e.g. those defined in STL's `<algorithm>` header), and it would be a shame if gMock -matchers are not allowed to participate. +matchers were not allowed to participate. Luckily, you can use a matcher where a unary predicate functor is expected by wrapping it inside the `Matches()` function. For example, @@ -1242,7 +1242,7 @@ what if you want to make sure the value *pointed to* by the pointer, instead of the pointer itself, has a certain property? Well, you can use the `Pointee(m)` matcher. -`Pointee(m)` matches a pointer iff `m` matches the value the pointer points to. +`Pointee(m)` matches a pointer if `m` matches the value the pointer points to. For example: ```cpp @@ -2596,7 +2596,7 @@ However, if the action has its own state, you may be surprised if you share the action object. Suppose you have an action factory `IncrementCounter(init)` which creates an action that increments and returns a counter whose initial value is `init`, using two actions created from the same expression and using a shared -action will exihibit different behaviors. Example: +action will exhibit different behaviors. Example: ```cpp EXPECT_CALL(foo, DoThis()) @@ -3539,7 +3539,7 @@ class MatcherInterface { public: virtual ~MatcherInterface(); - // Returns true iff the matcher matches x; also explains the match + // Returns true if the matcher matches x; also explains the match // result to 'listener'. virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0; @@ -3693,10 +3693,10 @@ class CardinalityInterface { public: virtual ~CardinalityInterface(); - // Returns true iff call_count calls will satisfy this cardinality. + // Returns true if call_count calls will satisfy this cardinality. virtual bool IsSatisfiedByCallCount(int call_count) const = 0; - // Returns true iff call_count calls will saturate this cardinality. + // Returns true if call_count calls will saturate this cardinality. virtual bool IsSaturatedByCallCount(int call_count) const = 0; // Describes self to an ostream. diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 6895dfd..e921cf4 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -99,7 +99,7 @@ struct BuiltInDefaultValueGetter<T, false> { template <typename T> class BuiltInDefaultValue { public: - // This function returns true iff type T has a built-in default value. + // This function returns true if type T has a built-in default value. static bool Exists() { return ::std::is_default_constructible<T>::value; } @@ -208,7 +208,7 @@ class DefaultValue { producer_ = nullptr; } - // Returns true iff the user has set the default value for type T. + // Returns true if the user has set the default value for type T. static bool IsSet() { return producer_ != nullptr; } // Returns true if T has a default return value set by the user or there @@ -269,7 +269,7 @@ class DefaultValue<T&> { // Unsets the default value for type T&. static void Clear() { address_ = nullptr; } - // Returns true iff the user has set the default value for type T&. + // Returns true if the user has set the default value for type T&. static bool IsSet() { return address_ != nullptr; } // Returns true if T has a default return value set by the user or there @@ -375,7 +375,7 @@ class Action { template <typename Func> explicit Action(const Action<Func>& action) : fun_(action.fun_) {} - // Returns true iff this is the DoDefault() action. + // Returns true if this is the DoDefault() action. bool IsDoDefault() const { return fun_ == nullptr; } // Performs the action. Note that this method is const even though @@ -395,7 +395,7 @@ class Action { template <typename G> friend class Action; - // fun_ is an empty function iff this is the DoDefault() action. + // fun_ is an empty function if this is the DoDefault() action. ::std::function<F> fun_; }; diff --git a/googlemock/include/gmock/gmock-cardinalities.h b/googlemock/include/gmock/gmock-cardinalities.h index 8fa25eb..4b269a3 100644 --- a/googlemock/include/gmock/gmock-cardinalities.h +++ b/googlemock/include/gmock/gmock-cardinalities.h @@ -70,10 +70,10 @@ class CardinalityInterface { virtual int ConservativeLowerBound() const { return 0; } virtual int ConservativeUpperBound() const { return INT_MAX; } - // Returns true iff call_count calls will satisfy this cardinality. + // Returns true if call_count calls will satisfy this cardinality. virtual bool IsSatisfiedByCallCount(int call_count) const = 0; - // Returns true iff call_count calls will saturate this cardinality. + // Returns true if call_count calls will saturate this cardinality. virtual bool IsSaturatedByCallCount(int call_count) const = 0; // Describes self to an ostream. @@ -98,17 +98,17 @@ class GTEST_API_ Cardinality { int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); } int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); } - // Returns true iff call_count calls will satisfy this cardinality. + // Returns true if call_count calls will satisfy this cardinality. bool IsSatisfiedByCallCount(int call_count) const { return impl_->IsSatisfiedByCallCount(call_count); } - // Returns true iff call_count calls will saturate this cardinality. + // Returns true if call_count calls will saturate this cardinality. bool IsSaturatedByCallCount(int call_count) const { return impl_->IsSaturatedByCallCount(call_count); } - // Returns true iff call_count calls will over-saturate this + // Returns true if call_count calls will over-saturate this // cardinality, i.e. exceed the maximum number of allowed calls. bool IsOverSaturatedByCallCount(int call_count) const { return impl_->IsSaturatedByCallCount(call_count) && diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index fcf8cf2..7075082 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -361,7 +361,7 @@ template <size_t N> class TuplePrefix { public: // TuplePrefix<N>::Matches(matcher_tuple, value_tuple) returns true - // iff the first N fields of matcher_tuple matches the first N + // if the first N fields of matcher_tuple matches the first N // fields of value_tuple, respectively. template <typename MatcherTuple, typename ValueTuple> static bool Matches(const MatcherTuple& matcher_tuple, @@ -420,7 +420,7 @@ class TuplePrefix<0> { ::std::ostream* /* os */) {} }; -// TupleMatches(matcher_tuple, value_tuple) returns true iff all +// TupleMatches(matcher_tuple, value_tuple) returns true if all // matchers in matcher_tuple match the corresponding fields in // value_tuple. It is a compiler error if matcher_tuple and // value_tuple have different number of fields or incompatible field @@ -2534,7 +2534,7 @@ class KeyMatcherImpl : public MatcherInterface<PairType> { testing::SafeMatcherCast<const KeyType&>(inner_matcher)) { } - // Returns true iff 'key_value.first' (the key) matches the inner matcher. + // Returns true if 'key_value.first' (the key) matches the inner matcher. bool MatchAndExplain(PairType key_value, MatchResultListener* listener) const override { StringMatchResultListener inner_listener; @@ -2616,7 +2616,7 @@ class PairMatcherImpl : public MatcherInterface<PairType> { second_matcher_.DescribeNegationTo(os); } - // Returns true iff 'a_pair.first' matches first_matcher and 'a_pair.second' + // Returns true if 'a_pair.first' matches first_matcher and 'a_pair.second' // matches second_matcher. bool MatchAndExplain(PairType a_pair, MatchResultListener* listener) const override { @@ -3152,7 +3152,7 @@ class ElementsAreArrayMatcher { // Given a 2-tuple matcher tm of type Tuple2Matcher and a value second // of type Second, BoundSecondMatcher<Tuple2Matcher, Second>(tm, -// second) is a polymorphic matcher that matches a value x iff tm +// second) is a polymorphic matcher that matches a value x if tm // matches tuple (x, second). Useful for implementing // UnorderedPointwise() in terms of UnorderedElementsAreArray(). // @@ -3217,7 +3217,7 @@ class BoundSecondMatcher { // Given a 2-tuple matcher tm and a value second, // MatcherBindSecond(tm, second) returns a matcher that matches a -// value x iff tm matches tuple (x, second). Useful for implementing +// value x if tm matches tuple (x, second). Useful for implementing // UnorderedPointwise() in terms of UnorderedElementsAreArray(). template <typename Tuple2Matcher, typename Second> BoundSecondMatcher<Tuple2Matcher, Second> MatcherBindSecond( @@ -3710,7 +3710,7 @@ WhenDynamicCastTo(const Matcher<To>& inner_matcher) { // Creates a matcher that matches an object whose given field matches // 'matcher'. For example, // Field(&Foo::number, Ge(5)) -// matches a Foo object x iff x.number >= 5. +// matches a Foo object x if x.number >= 5. template <typename Class, typename FieldType, typename FieldMatcher> inline PolymorphicMatcher< internal::FieldMatcher<Class, FieldType> > Field( @@ -3737,7 +3737,7 @@ inline PolymorphicMatcher<internal::FieldMatcher<Class, FieldType> > Field( // Creates a matcher that matches an object whose given property // matches 'matcher'. For example, // Property(&Foo::str, StartsWith("hi")) -// matches a Foo object x iff x.str() starts with "hi". +// matches a Foo object x if x.str() starts with "hi". template <typename Class, typename PropertyType, typename PropertyMatcher> inline PolymorphicMatcher<internal::PropertyMatcher< Class, PropertyType, PropertyType (Class::*)() const> > @@ -3792,11 +3792,11 @@ Property(const std::string& property_name, property_name, property, MatcherCast<const PropertyType&>(matcher))); } -// Creates a matcher that matches an object iff the result of applying +// Creates a matcher that matches an object if the result of applying // a callable to x matches 'matcher'. // For example, // ResultOf(f, StartsWith("hi")) -// matches a Foo object x iff f(x) starts with "hi". +// matches a Foo object x if f(x) starts with "hi". // `callable` parameter can be a function, function pointer, or a functor. It is // required to keep no state affecting the results of the calls on it and make // no assumptions about how many calls will be made. Any state it keeps must be @@ -4345,7 +4345,7 @@ inline internal::MatcherAsPredicate<M> Matches(M matcher) { return internal::MatcherAsPredicate<M>(matcher); } -// Returns true iff the value matches the matcher. +// Returns true if the value matches the matcher. template <typename T, typename M> inline bool Value(const T& value, M matcher) { return testing::Matches(matcher)(value); @@ -4551,7 +4551,7 @@ PolymorphicMatcher<internal::variant_matcher::VariantMatcher<T> > VariantWith( // These macros allow using matchers to check values in Google Test // tests. ASSERT_THAT(value, matcher) and EXPECT_THAT(value, matcher) -// succeed iff the value matches the matcher. If the assertion fails, +// succeed if the value matches the matcher. If the assertion fails, // the value and the description of the matcher will be printed. #define ASSERT_THAT(value, matcher) ASSERT_PRED_FORMAT1(\ ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value) diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index 255d6ad..81ee345 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -331,7 +331,7 @@ class OnCallSpec : public UntypedOnCallSpecBase { return *this; } - // Returns true iff the given arguments match the matchers. + // Returns true if the given arguments match the matchers. bool Matches(const ArgumentTuple& args) const { return TupleMatches(matchers_, args) && extra_matcher_.Matches(args); } @@ -389,7 +389,7 @@ class GTEST_API_ Mock { GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex); // Verifies all expectations on the given mock object and clears its - // default actions and expectations. Returns true iff the + // default actions and expectations. Returns true if the // verification was successful. static bool VerifyAndClear(void* mock_obj) GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex); @@ -515,7 +515,7 @@ class GTEST_API_ Expectation { // The compiler-generated copy ctor and operator= work exactly as // intended, so we don't need to define our own. - // Returns true iff rhs references the same expectation as this object does. + // Returns true if rhs references the same expectation as this object does. bool operator==(const Expectation& rhs) const { return expectation_base_ == rhs.expectation_base_; } @@ -597,7 +597,7 @@ class ExpectationSet { // The compiler-generator ctor and operator= works exactly as // intended, so we don't need to define our own. - // Returns true iff rhs contains the same set of Expectation objects + // Returns true if rhs contains the same set of Expectation objects // as this does. bool operator==(const ExpectationSet& rhs) const { return expectations_ == rhs.expectations_; @@ -759,7 +759,7 @@ class GTEST_API_ ExpectationBase { // by the subclasses to implement the .Times() clause. void SpecifyCardinality(const Cardinality& cardinality); - // Returns true iff the user specified the cardinality explicitly + // Returns true if the user specified the cardinality explicitly // using a .Times(). bool cardinality_specified() const { return cardinality_specified_; } @@ -776,7 +776,7 @@ class GTEST_API_ ExpectationBase { void RetireAllPreRequisites() GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex); - // Returns true iff this expectation is retired. + // Returns true if this expectation is retired. bool is_retired() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { g_gmock_mutex.AssertHeld(); @@ -790,28 +790,28 @@ class GTEST_API_ ExpectationBase { retired_ = true; } - // Returns true iff this expectation is satisfied. + // Returns true if this expectation is satisfied. bool IsSatisfied() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { g_gmock_mutex.AssertHeld(); return cardinality().IsSatisfiedByCallCount(call_count_); } - // Returns true iff this expectation is saturated. + // Returns true if this expectation is saturated. bool IsSaturated() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { g_gmock_mutex.AssertHeld(); return cardinality().IsSaturatedByCallCount(call_count_); } - // Returns true iff this expectation is over-saturated. + // Returns true if this expectation is over-saturated. bool IsOverSaturated() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { g_gmock_mutex.AssertHeld(); return cardinality().IsOverSaturatedByCallCount(call_count_); } - // Returns true iff all pre-requisites of this expectation are satisfied. + // Returns true if all pre-requisites of this expectation are satisfied. bool AllPrerequisitesAreSatisfied() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex); @@ -854,7 +854,7 @@ class GTEST_API_ ExpectationBase { const char* file_; // The file that contains the expectation. int line_; // The line number of the expectation. const std::string source_text_; // The EXPECT_CALL(...) source text. - // True iff the cardinality is specified explicitly. + // True if the cardinality is specified explicitly. bool cardinality_specified_; Cardinality cardinality_; // The cardinality of the expectation. // The immediate pre-requisites (i.e. expectations that must be @@ -868,7 +868,7 @@ class GTEST_API_ ExpectationBase { // This group of fields are the current state of the expectation, // and can change as the mock function is called. int call_count_; // How many times this expectation has been invoked. - bool retired_; // True iff this expectation has retired. + bool retired_; // True if this expectation has retired. UntypedActions untyped_actions_; bool extra_matcher_specified_; bool repeated_action_specified_; // True if a WillRepeatedly() was specified. @@ -1086,14 +1086,14 @@ class TypedExpectation : public ExpectationBase { // statement finishes and when the current thread holds // g_gmock_mutex. - // Returns true iff this expectation matches the given arguments. + // Returns true if this expectation matches the given arguments. bool Matches(const ArgumentTuple& args) const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { g_gmock_mutex.AssertHeld(); return TupleMatches(matchers_, args) && extra_matcher_.Matches(args); } - // Returns true iff this expectation should handle the given arguments. + // Returns true if this expectation should handle the given arguments. bool ShouldHandleArguments(const ArgumentTuple& args) const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { g_gmock_mutex.AssertHeld(); diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 01e96cf..ee00479 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -176,11 +176,11 @@ GMOCK_DECLARE_KIND_(long double, kFloatingPoint); static_cast< ::testing::internal::TypeKind>( \ ::testing::internal::KindOf<type>::value) -// Evaluates to true iff integer type T is signed. +// Evaluates to true if integer type T is signed. #define GMOCK_IS_SIGNED_(T) (static_cast<T>(-1) < 0) // LosslessArithmeticConvertibleImpl<kFromKind, From, kToKind, To>::value -// is true iff arithmetic type From can be losslessly converted to +// is true if arithmetic type From can be losslessly converted to // arithmetic type To. // // It's the user's responsibility to ensure that both From and To are @@ -211,7 +211,7 @@ template <typename From> struct LosslessArithmeticConvertibleImpl<kInteger, From, kBool, bool> : public false_type {}; // NOLINT -// Converting an integer to another non-bool integer is lossless iff +// Converting an integer to another non-bool integer is lossless if // the target type's range encloses the source type's range. template <typename From, typename To> struct LosslessArithmeticConvertibleImpl<kInteger, From, kInteger, To> @@ -243,13 +243,13 @@ struct LosslessArithmeticConvertibleImpl<kFloatingPoint, From, kInteger, To> : public false_type {}; // NOLINT // Converting a floating-point to another floating-point is lossless -// iff the target type is at least as big as the source type. +// if the target type is at least as big as the source type. template <typename From, typename To> struct LosslessArithmeticConvertibleImpl< kFloatingPoint, From, kFloatingPoint, To> : public bool_constant<sizeof(From) <= sizeof(To)> {}; // NOLINT -// LosslessArithmeticConvertible<From, To>::value is true iff arithmetic +// LosslessArithmeticConvertible<From, To>::value is true if arithmetic // type From can be losslessly converted to arithmetic type To. // // It's the user's responsibility to ensure that both From and To are @@ -324,11 +324,11 @@ const char kWarningVerbosity[] = "warning"; // No logs are printed. const char kErrorVerbosity[] = "error"; -// Returns true iff a log with the given severity is visible according +// Returns true if a log with the given severity is visible according // to the --gmock_verbose flag. GTEST_API_ bool LogIsVisible(LogSeverity severity); -// Prints the given message to stdout iff 'severity' >= the level +// Prints the given message to stdout if 'severity' >= the level // specified by the --gmock_verbose flag. If stack_frames_to_skip >= // 0, also prints the stack trace excluding the top // stack_frames_to_skip frames. In opt mode, any positive @@ -355,11 +355,11 @@ GTEST_API_ WithoutMatchers GetWithoutMatchers(); // Type traits. -// is_reference<T>::value is non-zero iff T is a reference type. +// is_reference<T>::value is non-zero if T is a reference type. template <typename T> struct is_reference : public false_type {}; template <typename T> struct is_reference<T&> : public true_type {}; -// type_equals<T1, T2>::value is non-zero iff T1 and T2 are the same type. +// type_equals<T1, T2>::value is non-zero if T1 and T2 are the same type. template <typename T1, typename T2> struct type_equals : public false_type {}; template <typename T> struct type_equals<T, T> : public true_type {}; diff --git a/googlemock/scripts/upload.py b/googlemock/scripts/upload.py index 95239dc..4b57473 100755 --- a/googlemock/scripts/upload.py +++ b/googlemock/scripts/upload.py @@ -631,7 +631,7 @@ class VersionControlSystem(object): new_content: For text files, this is empty. For binary files, this is the contents of the new file, since the diff output won't contain information to reconstruct the current file. - is_binary: True iff the file is binary. + is_binary: True if the file is binary. status: The status of the file. """ diff --git a/googlemock/src/gmock-internal-utils.cc b/googlemock/src/gmock-internal-utils.cc index 1594662..1292e1d 100644 --- a/googlemock/src/gmock-internal-utils.cc +++ b/googlemock/src/gmock-internal-utils.cc @@ -123,7 +123,7 @@ GTEST_API_ FailureReporterInterface* GetFailureReporter() { // Protects global resources (stdout in particular) used by Log(). static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex); -// Returns true iff a log with the given severity is visible according +// Returns true if a log with the given severity is visible according // to the --gmock_verbose flag. GTEST_API_ bool LogIsVisible(LogSeverity severity) { if (GMOCK_FLAG(verbose) == kInfoVerbosity) { @@ -139,7 +139,7 @@ GTEST_API_ bool LogIsVisible(LogSeverity severity) { } } -// Prints the given message to stdout iff 'severity' >= the level +// Prints the given message to stdout if 'severity' >= the level // specified by the --gmock_verbose flag. If stack_frames_to_skip >= // 0, also prints the stack trace excluding the top // stack_frames_to_skip frames. In opt mode, any positive diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index ea8e173..f6705a3 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -126,7 +126,7 @@ void ExpectationBase::RetireAllPreRequisites() } } -// Returns true iff all pre-requisites of this expectation have been +// Returns true if all pre-requisites of this expectation have been // satisfied. bool ExpectationBase::AllPrerequisitesAreSatisfied() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { @@ -384,7 +384,7 @@ UntypedActionResultHolderBase* UntypedFunctionMockerBase::UntypedInvokeWith( const CallReaction reaction = Mock::GetReactionOnUninterestingCalls(MockObject()); - // True iff we need to print this call's arguments and return + // True if we need to print this call's arguments and return // value. This definition must be kept in sync with // the behavior of ReportUninterestingCall(). const bool need_to_report_uninteresting_call = @@ -435,7 +435,7 @@ UntypedActionResultHolderBase* UntypedFunctionMockerBase::UntypedInvokeWith( &ss, &why); const bool found = untyped_expectation != nullptr; - // True iff we need to print the call's arguments and return value. + // True if we need to print the call's arguments and return value. // This definition must be kept in sync with the uses of Expect() // and Log() in this function. const bool need_to_report_call = @@ -574,7 +574,7 @@ struct MockObjectState { int first_used_line; ::std::string first_used_test_suite; ::std::string first_used_test; - bool leakable; // true iff it's OK to leak the object. + bool leakable; // true if it's OK to leak the object. FunctionMockers function_mockers; // All registered methods of the object. }; @@ -718,7 +718,7 @@ bool Mock::VerifyAndClearExpectations(void* mock_obj) } // Verifies all expectations on the given mock object and clears its -// default actions and expectations. Returns true iff the +// default actions and expectations. Returns true if the // verification was successful. bool Mock::VerifyAndClear(void* mock_obj) GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { diff --git a/googlemock/src/gmock.cc b/googlemock/src/gmock.cc index 05566e2..ce926f2 100644 --- a/googlemock/src/gmock.cc +++ b/googlemock/src/gmock.cc @@ -34,7 +34,7 @@ namespace testing { GMOCK_DEFINE_bool_(catch_leaked_mocks, true, - "true iff Google Mock should report leaked mock objects " + "true if Google Mock should report leaked mock objects " "as failures."); GMOCK_DEFINE_string_(verbose, internal::kWarningVerbosity, diff --git a/googlemock/test/gmock-cardinalities_test.cc b/googlemock/test/gmock-cardinalities_test.cc index 60fd06a..66042d4 100644 --- a/googlemock/test/gmock-cardinalities_test.cc +++ b/googlemock/test/gmock-cardinalities_test.cc @@ -395,12 +395,12 @@ TEST(ExactlyTest, HasCorrectBounds) { class EvenCardinality : public CardinalityInterface { public: - // Returns true iff call_count calls will satisfy this cardinality. + // Returns true if call_count calls will satisfy this cardinality. bool IsSatisfiedByCallCount(int call_count) const override { return (call_count % 2 == 0); } - // Returns true iff call_count calls will saturate this cardinality. + // Returns true 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 89ad335..74e9294 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -956,7 +956,7 @@ TEST(TypedEqTest, CanDescribeSelf) { // Tests that TypedEq<T>(v) has type Matcher<T>. -// Type<T>::IsTypeOf(v) compiles iff the type of value v is T, where 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". @@ -2640,7 +2640,7 @@ class IsGreaterThan { // For testing Truly(). const int foo = 0; -// This predicate returns true iff the argument references foo and has +// This predicate returns true if the argument references foo and has // a zero value. bool ReferencesFooAndIsZero(const int& n) { return (&n == &foo) && (n == 0); @@ -3594,7 +3594,7 @@ class Uncopyable { GTEST_DISALLOW_COPY_AND_ASSIGN_(Uncopyable); }; -// Returns true iff x.value() is positive. +// Returns true 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 d362a90..95b4b8b 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -1952,12 +1952,12 @@ TEST(DeletingMockEarlyTest, Failure2) { class EvenNumberCardinality : public CardinalityInterface { public: - // Returns true iff call_count calls will satisfy this cardinality. + // Returns true if call_count calls will satisfy this cardinality. bool IsSatisfiedByCallCount(int call_count) const override { return call_count % 2 == 0; } - // Returns true iff call_count calls will saturate this cardinality. + // Returns true if call_count calls will saturate this cardinality. bool IsSaturatedByCallCount(int /* call_count */) const override { return false; } diff --git a/googletest/include/gtest/gtest-death-test.h b/googletest/include/gtest/gtest-death-test.h index 0eb5b27..cec9629 100644 --- a/googletest/include/gtest/gtest-death-test.h +++ b/googletest/include/gtest/gtest-death-test.h @@ -276,7 +276,7 @@ class GTEST_API_ KilledBySignal { // This macro is used for implementing macros such as // EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where // death tests are not supported. Those macros must compile on such systems -// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on +// if EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on // systems that support death tests. This allows one to write such a macro // on a system that does not support death tests and be sure that it will // compile on a death-test supporting system. It is exposed publicly so that @@ -289,7 +289,7 @@ class GTEST_API_ KilledBySignal { // for program termination. This macro has to make sure this // statement is compiled but not executed, to ensure that // EXPECT_DEATH_IF_SUPPORTED compiles with a certain -// parameter iff EXPECT_DEATH compiles with it. +// parameter if EXPECT_DEATH compiles with it. // regex - A regex that a macro such as EXPECT_DEATH would use to test // the output of statement. This parameter has to be // compiled but not evaluated by this macro, to ensure that diff --git a/googletest/include/gtest/gtest-matchers.h b/googletest/include/gtest/gtest-matchers.h index 6e73ba1..7711178 100644 --- a/googletest/include/gtest/gtest-matchers.h +++ b/googletest/include/gtest/gtest-matchers.h @@ -95,7 +95,7 @@ class MatchResultListener { // Returns the underlying ostream. ::std::ostream* stream() { return stream_; } - // Returns true iff the listener is interested in an explanation of + // Returns true if the listener is interested in an explanation of // the match result. A matcher's MatchAndExplain() method can use // this information to avoid generating the explanation when no one // intends to hear it. @@ -140,7 +140,7 @@ class MatcherDescriberInterface { template <typename T> class MatcherInterface : public MatcherDescriberInterface { public: - // Returns true iff the matcher matches x; also explains the match + // Returns true if the matcher matches x; also explains the match // result to 'listener' if necessary (see the next paragraph), in // the form of a non-restrictive relative clause ("which ...", // "whose ...", etc) that describes x. For example, the @@ -257,13 +257,13 @@ class StreamMatchResultListener : public MatchResultListener { template <typename T> class MatcherBase { public: - // Returns true iff the matcher matches x; also explains the match + // Returns true if the matcher matches x; also explains the match // result to 'listener'. bool MatchAndExplain(const T& x, MatchResultListener* listener) const { return impl_->MatchAndExplain(x, listener); } - // Returns true iff this matcher matches x. + // Returns true if this matcher matches x. bool Matches(const T& x) const { DummyMatchResultListener dummy; return MatchAndExplain(x, &dummy); diff --git a/googletest/include/gtest/gtest-test-part.h b/googletest/include/gtest/gtest-test-part.h index 1e1cb09..4f189b6 100644 --- a/googletest/include/gtest/gtest-test-part.h +++ b/googletest/include/gtest/gtest-test-part.h @@ -87,19 +87,19 @@ class GTEST_API_ TestPartResult { // Gets the message associated with the test part. const char* message() const { return message_.c_str(); } - // Returns true iff the test part was skipped. + // Returns true if the test part was skipped. bool skipped() const { return type_ == kSkip; } - // Returns true iff the test part passed. + // Returns true if the test part passed. bool passed() const { return type_ == kSuccess; } - // Returns true iff the test part non-fatally failed. + // Returns true if the test part non-fatally failed. bool nonfatally_failed() const { return type_ == kNonFatalFailure; } - // Returns true iff the test part fatally failed. + // Returns true if the test part fatally failed. bool fatally_failed() const { return type_ == kFatalFailure; } - // Returns true iff the test part failed. + // Returns true if the test part failed. bool failed() const { return fatally_failed() || nonfatally_failed(); } private: diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index ff77075..d12563c 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -308,7 +308,7 @@ class GTEST_API_ AssertionResult { return *this; } - // Returns true iff the assertion succeeded. + // Returns true if the assertion succeeded. operator bool() const { return success_; } // NOLINT // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE. @@ -428,16 +428,16 @@ class GTEST_API_ Test { static void SetUpTestCase() {} #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ - // Returns true iff the current test has a fatal failure. + // Returns true if the current test has a fatal failure. static bool HasFatalFailure(); - // Returns true iff the current test has a non-fatal failure. + // Returns true if the current test has a non-fatal failure. static bool HasNonfatalFailure(); - // Returns true iff the current test was skipped. + // Returns true if the current test was skipped. static bool IsSkipped(); - // Returns true iff the current test has a (either fatal or + // Returns true if the current test has a (either fatal or // non-fatal) failure. static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); } @@ -468,7 +468,7 @@ class GTEST_API_ Test { virtual void TearDown(); private: - // Returns true iff the current test has the same fixture class as + // Returns true if the current test has the same fixture class as // the first test in the current test suite. static bool HasSameFixtureClass(); @@ -570,19 +570,19 @@ class GTEST_API_ TestResult { // Returns the number of the test properties. int test_property_count() const; - // Returns true iff the test passed (i.e. no test part failed). + // Returns true if the test passed (i.e. no test part failed). bool Passed() const { return !Skipped() && !Failed(); } - // Returns true iff the test was skipped. + // Returns true if the test was skipped. bool Skipped() const; - // Returns true iff the test failed. + // Returns true if the test failed. bool Failed() const; - // Returns true iff the test fatally failed. + // Returns true if the test fatally failed. bool HasFatalFailure() const; - // Returns true iff the test has a non-fatal failure. + // Returns true if the test has a non-fatal failure. bool HasNonfatalFailure() const; // Returns the elapsed time, in milliseconds. @@ -746,7 +746,7 @@ class GTEST_API_ TestInfo { // contains the character 'A' or starts with "Foo.". bool should_run() const { return should_run_; } - // Returns true iff this test will appear in the XML report. + // Returns true if this test will appear in the XML report. bool is_reportable() const { // The XML report includes tests matching the filter, excluding those // run in other shards. @@ -805,8 +805,8 @@ class GTEST_API_ TestInfo { const std::unique_ptr<const ::std::string> value_param_; internal::CodeLocation location_; const internal::TypeId fixture_class_id_; // ID of the test fixture class - bool should_run_; // True iff this test should run - bool is_disabled_; // True iff this test is disabled + bool should_run_; // True if this test should run + bool is_disabled_; // True if this test is disabled bool matches_filter_; // True if this test matches the // user-specified filter. bool is_in_another_shard_; // Will be run in another shard. @@ -881,10 +881,10 @@ class GTEST_API_ TestSuite { // Gets the number of all tests in this test suite. int total_test_count() const; - // Returns true iff the test suite passed. + // Returns true if the test suite passed. bool Passed() const { return !Failed(); } - // Returns true iff the test suite failed. + // Returns true if the test suite failed. bool Failed() const { return failed_test_count() > 0; } // Returns the elapsed time, in milliseconds. @@ -952,33 +952,33 @@ class GTEST_API_ TestSuite { } } - // Returns true iff test passed. + // Returns true if test passed. static bool TestPassed(const TestInfo* test_info) { return test_info->should_run() && test_info->result()->Passed(); } - // Returns true iff test skipped. + // Returns true if test skipped. static bool TestSkipped(const TestInfo* test_info) { return test_info->should_run() && test_info->result()->Skipped(); } - // Returns true iff test failed. + // Returns true if test failed. static bool TestFailed(const TestInfo* test_info) { return test_info->should_run() && test_info->result()->Failed(); } - // Returns true iff the test is disabled and will be reported in the XML + // Returns true if the test is disabled and will be reported in the XML // report. static bool TestReportableDisabled(const TestInfo* test_info) { return test_info->is_reportable() && test_info->is_disabled_; } - // Returns true iff test is disabled. + // Returns true if test is disabled. static bool TestDisabled(const TestInfo* test_info) { return test_info->is_disabled_; } - // Returns true iff this test will appear in the XML report. + // Returns true if this test will appear in the XML report. static bool TestReportable(const TestInfo* test_info) { return test_info->is_reportable(); } @@ -1010,7 +1010,7 @@ class GTEST_API_ TestSuite { internal::SetUpTestSuiteFunc set_up_tc_; // Pointer to the function that tears down the test suite. internal::TearDownTestSuiteFunc tear_down_tc_; - // True iff any test in this test suite should run. + // True if any test in this test suite should run. bool should_run_; // The start time, in milliseconds since UNIX Epoch. TimeInMillis start_timestamp_; @@ -1345,10 +1345,10 @@ class GTEST_API_ UnitTest { // Gets the elapsed time, in milliseconds. TimeInMillis elapsed_time() const; - // Returns true iff the unit test passed (i.e. all test suites passed). + // Returns true if the unit test passed (i.e. all test suites passed). bool Passed() const; - // Returns true iff the unit test failed (i.e. some test suite failed + // Returns true if the unit test failed (i.e. some test suite failed // or something outside of all tests failed). bool Failed() const; @@ -2263,7 +2263,7 @@ class GTEST_API_ ScopedTrace { // Compile-time assertion for type equality. -// StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are +// StaticAssertTypeEq<type1, type2>() compiles if type1 and type2 are // the same type. The value it returns is not interesting. // // Instead of making StaticAssertTypeEq a class template, we make it a diff --git a/googletest/include/gtest/internal/gtest-filepath.h b/googletest/include/gtest/internal/gtest-filepath.h index ae38d95..5d21bbc 100644 --- a/googletest/include/gtest/internal/gtest-filepath.h +++ b/googletest/include/gtest/internal/gtest-filepath.h @@ -110,7 +110,7 @@ class GTEST_API_ FilePath { const FilePath& base_name, const char* extension); - // Returns true iff the path is "". + // Returns true if the path is "". bool IsEmpty() const { return pathname_.empty(); } // If input name has a trailing separator character, removes it and returns diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 2732660..08531d8 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -189,7 +189,7 @@ GTEST_API_ std::string DiffStrings(const std::string& left, // expected_value: "5" // actual_value: "6" // -// The ignoring_case parameter is true iff the assertion is a +// The ignoring_case parameter is true if the assertion is a // *_STRCASEEQ*. When it's true, the string " (ignoring case)" will // be inserted into the message. GTEST_API_ AssertionResult EqFailure(const char* expected_expression, @@ -318,14 +318,14 @@ class FloatingPoint { // Returns the sign bit of this number. Bits sign_bit() const { return kSignBitMask & u_.bits_; } - // Returns true iff this is NAN (not a number). + // Returns true if this is NAN (not a number). bool is_nan() const { // It's a NAN if the exponent bits are all ones and the fraction // bits are not entirely zeros. return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0); } - // Returns true iff this number is at most kMaxUlps ULP's away from + // Returns true if this number is at most kMaxUlps ULP's away from // rhs. In particular, this function: // // - returns false if either number is (or both are) NAN. @@ -848,7 +848,7 @@ class GTEST_API_ Random { }; // Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a -// compiler error iff T1 and T2 are different types. +// compiler error if T1 and T2 are different types. template <typename T1, typename T2> struct CompileAssertTypesEqual; @@ -895,7 +895,7 @@ struct RemoveConst<const T[N]> { GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T)) // IsAProtocolMessage<T>::value is a compile-time bool constant that's -// true iff T is type proto2::Message or a subclass of it. +// true if T is type proto2::Message or a subclass of it. template <typename T> struct IsAProtocolMessage : public bool_constant< diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 0a9a331..4f887c5 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -362,7 +362,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; # include <android/api-level.h> // NOLINT #endif -// Defines this to true iff Google Test can use POSIX regular expressions. +// Defines this to true if Google Test can use POSIX regular expressions. #ifndef GTEST_HAS_POSIX_RE # if GTEST_OS_LINUX_ANDROID // On Android, <regex.h> is only available starting with Gingerbread. @@ -403,7 +403,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // The user didn't tell us whether exceptions are enabled, so we need // to figure it out. # if defined(_MSC_VER) && defined(_CPPUNWIND) -// MSVC defines _CPPUNWIND to 1 iff exceptions are enabled. +// MSVC defines _CPPUNWIND to 1 if exceptions are enabled. # define GTEST_HAS_EXCEPTIONS 1 # elif defined(__BORLANDC__) // C++Builder's implementation of the STL uses the _HAS_EXCEPTIONS @@ -414,8 +414,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; # endif // _HAS_EXCEPTIONS # define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS # elif defined(__clang__) -// clang defines __EXCEPTIONS iff exceptions are enabled before clang 220714, -// but iff cleanups are enabled after that. In Obj-C++ files, there can be +// clang defines __EXCEPTIONS if exceptions are enabled before clang 220714, +// but if cleanups are enabled after that. In Obj-C++ files, there can be // cleanups for ObjC exceptions which also need cleanups, even if C++ exceptions // are disabled. clang has __has_feature(cxx_exceptions) which checks for C++ // exceptions starting at clang r206352, but which checked for cleanups prior to @@ -423,7 +423,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // __EXCEPTIONS && __has_feature(cxx_exceptions). # define GTEST_HAS_EXCEPTIONS (__EXCEPTIONS && __has_feature(cxx_exceptions)) # elif defined(__GNUC__) && __EXCEPTIONS -// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled. +// gcc defines __EXCEPTIONS to 1 if exceptions are enabled. # define GTEST_HAS_EXCEPTIONS 1 # elif defined(__SUNPRO_CC) // Sun Pro CC supports exceptions. However, there is no compile-time way of @@ -431,7 +431,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // they are enabled unless the user tells us otherwise. # define GTEST_HAS_EXCEPTIONS 1 # elif defined(__IBMCPP__) && __EXCEPTIONS -// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled. +// xlC defines __EXCEPTIONS to 1 if exceptions are enabled. # define GTEST_HAS_EXCEPTIONS 1 # elif defined(__HP_aCC) // Exception handling is in effect by default in HP aCC compiler. It has to @@ -472,13 +472,13 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; # ifdef _MSC_VER -# ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled. +# ifdef _CPPRTTI // MSVC defines this macro if RTTI is enabled. # define GTEST_HAS_RTTI 1 # else # define GTEST_HAS_RTTI 0 # endif -// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled. +// Starting with version 4.3.2, gcc defines __GXX_RTTI if RTTI is enabled. # elif defined(__GNUC__) # ifdef __GXX_RTTI @@ -909,9 +909,9 @@ class GTEST_API_ RE { // Returns the string representation of the regex. const char* pattern() const { return pattern_; } - // FullMatch(str, re) returns true iff regular expression re matches + // FullMatch(str, re) returns true if regular expression re matches // the entire str. - // PartialMatch(str, re) returns true iff regular expression re + // PartialMatch(str, re) returns true if regular expression re // matches a substring of str (including str itself). static bool FullMatch(const ::std::string& str, const RE& re) { return FullMatch(str.c_str(), re); @@ -1266,7 +1266,7 @@ class GTEST_API_ AutoHandle { void Reset(Handle handle); private: - // Returns true iff the handle is a valid handle object that can be closed. + // Returns true if the handle is a valid handle object that can be closed. bool IsCloseable() const; Handle handle_; @@ -1368,7 +1368,7 @@ class ThreadWithParam : public ThreadWithParamBase { // When non-NULL, used to block execution until the controller thread // notifies. Notification* const thread_can_start_; - bool finished_; // true iff we know that the thread function has finished. + bool finished_; // true if we know that the thread function has finished. pthread_t thread_; // The native thread object. GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam); diff --git a/googletest/include/gtest/internal/gtest-string.h b/googletest/include/gtest/internal/gtest-string.h index 884b1e1..26d8407 100644 --- a/googletest/include/gtest/internal/gtest-string.h +++ b/googletest/include/gtest/internal/gtest-string.h @@ -94,7 +94,7 @@ class GTEST_API_ String { static const char* Utf16ToAnsi(LPCWSTR utf16_str); #endif - // Compares two C strings. Returns true iff they have the same content. + // Compares two C strings. Returns true if they have the same content. // // Unlike strcmp(), this function can handle NULL argument(s). A // NULL C string is considered different to any non-NULL C string, @@ -107,7 +107,7 @@ class GTEST_API_ String { // returned. static std::string ShowWideCString(const wchar_t* wide_c_str); - // Compares two wide C strings. Returns true iff they have the same + // Compares two wide C strings. Returns true if they have the same // content. // // Unlike wcscmp(), this function can handle NULL argument(s). A @@ -115,7 +115,7 @@ class GTEST_API_ String { // including the empty string. static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs); - // Compares two C strings, ignoring case. Returns true iff they + // Compares two C strings, ignoring case. Returns true if they // have the same content. // // Unlike strcasecmp(), this function can handle NULL argument(s). @@ -124,7 +124,7 @@ class GTEST_API_ String { static bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs); - // Compares two wide C strings, ignoring case. Returns true iff they + // Compares two wide C strings, ignoring case. Returns true if they // have the same content. // // Unlike wcscasecmp(), this function can handle NULL argument(s). @@ -139,7 +139,7 @@ class GTEST_API_ String { static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs, const wchar_t* rhs); - // Returns true iff the given string ends with the given suffix, ignoring + // Returns true if the given string ends with the given suffix, ignoring // case. Any string is considered to end with an empty suffix. static bool EndsWithCaseInsensitive( const std::string& str, const std::string& suffix); diff --git a/googletest/include/gtest/internal/gtest-type-util.h b/googletest/include/gtest/internal/gtest-type-util.h index 4cd1cf3..5f9a056 100644 --- a/googletest/include/gtest/internal/gtest-type-util.h +++ b/googletest/include/gtest/internal/gtest-type-util.h @@ -105,7 +105,7 @@ std::string GetTypeName() { #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P -// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same +// AssertyTypeEq<T1, T2>::type is defined if T1 and T2 are the same // type. This can be used as a compile-time assertion to ensure that // two types are equal. diff --git a/googletest/include/gtest/internal/gtest-type-util.h.pump b/googletest/include/gtest/internal/gtest-type-util.h.pump index eb014ee..3a3896b 100644 --- a/googletest/include/gtest/internal/gtest-type-util.h.pump +++ b/googletest/include/gtest/internal/gtest-type-util.h.pump @@ -104,7 +104,7 @@ std::string GetTypeName() { #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P -// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same +// AssertyTypeEq<T1, T2>::type is defined if T1 and T2 are the same // type. This can be used as a compile-time assertion to ensure that // two types are equal. diff --git a/googletest/samples/prime_tables.h b/googletest/samples/prime_tables.h index 119545a..4178e70 100644 --- a/googletest/samples/prime_tables.h +++ b/googletest/samples/prime_tables.h @@ -43,7 +43,7 @@ class PrimeTable { public: virtual ~PrimeTable() {} - // Returns true iff n is a prime number. + // Returns true if n is a prime number. virtual bool IsPrime(int n) const = 0; // Returns the smallest prime number greater than p; or returns -1 diff --git a/googletest/samples/sample1.cc b/googletest/samples/sample1.cc index 13cec1d..58dbf17 100644 --- a/googletest/samples/sample1.cc +++ b/googletest/samples/sample1.cc @@ -41,7 +41,7 @@ int Factorial(int n) { return result; } -// Returns true iff n is a prime number. +// Returns true if n is a prime number. bool IsPrime(int n) { // Trivial case 1: small numbers if (n <= 1) return false; diff --git a/googletest/samples/sample1.h b/googletest/samples/sample1.h index 2c3e9f0..a90eae4 100644 --- a/googletest/samples/sample1.h +++ b/googletest/samples/sample1.h @@ -35,7 +35,7 @@ // Returns n! (the factorial of n). For negative n, n! is defined to be 1. int Factorial(int n); -// Returns true iff n is a prime number. +// Returns true if n is a prime number. bool IsPrime(int n); #endif // GTEST_SAMPLES_SAMPLE1_H_ diff --git a/googletest/scripts/gen_gtest_pred_impl.py b/googletest/scripts/gen_gtest_pred_impl.py index b43efdf..b00830d 100755 --- a/googletest/scripts/gen_gtest_pred_impl.py +++ b/googletest/scripts/gen_gtest_pred_impl.py @@ -540,10 +540,10 @@ class Predicate%(n)sTest : public testing::Test { } } - // true iff the test function is expected to run to finish. + // true if the test function is expected to run to finish. static bool expected_to_finish_; - // true iff the test function did run to finish. + // true if the test function did run to finish. static bool finished_; """ % DEFS @@ -572,12 +572,12 @@ typedef Predicate%(n)sTest ASSERT_PRED%(n)sTest; """Returns the test for a predicate assertion macro. Args: - use_format: true iff the assertion is a *_PRED_FORMAT*. - use_assert: true iff the assertion is a ASSERT_*. - expect_failure: true iff the assertion is expected to fail. - use_functor: true iff the first argument of the assertion is + use_format: true if the assertion is a *_PRED_FORMAT*. + use_assert: true if the assertion is a ASSERT_*. + expect_failure: true if the assertion is expected to fail. + use_functor: true if the first argument of the assertion is a functor (as opposed to a function) - use_user_type: true iff the predicate functor/function takes + use_user_type: true if the predicate functor/function takes argument(s) of a user-defined type. Example: diff --git a/googletest/scripts/pump.py b/googletest/scripts/pump.py index 5efb653..7dfb87a 100755 --- a/googletest/scripts/pump.py +++ b/googletest/scripts/pump.py @@ -161,7 +161,7 @@ class Token: def StartsWith(lines, pos, string): - """Returns True iff the given position in lines starts with 'string'.""" + """Returns True if the given position in lines starts with 'string'.""" return lines[pos.line][pos.column:].startswith(string) diff --git a/googletest/scripts/upload.py b/googletest/scripts/upload.py index c852e4c..8563e5f 100755 --- a/googletest/scripts/upload.py +++ b/googletest/scripts/upload.py @@ -631,7 +631,7 @@ class VersionControlSystem(object): new_content: For text files, this is empty. For binary files, this is the contents of the new file, since the diff output won't contain information to reconstruct the current file. - is_binary: True iff the file is binary. + is_binary: True if the file is binary. status: The status of the file. """ diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 2b1b419..e5ec287 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -563,7 +563,7 @@ static ::std::string FormatDeathTestOutput(const ::std::string& output) { // status_ok: true if exit_status is acceptable in the context of // this particular death test, which fails if it is false // -// Returns true iff all of the above conditions are met. Otherwise, the +// Returns true if all of the above conditions are met. Otherwise, the // first failing condition, in the order given above, is the one that is // reported. Also sets the last death test message string. bool DeathTestImpl::Passed(bool status_ok) { diff --git a/googletest/src/gtest-internal-inl.h b/googletest/src/gtest-internal-inl.h index 53cd22b..e29d992 100644 --- a/googletest/src/gtest-internal-inl.h +++ b/googletest/src/gtest-internal-inl.h @@ -99,14 +99,14 @@ const char kFlagfileFlag[] = "flagfile"; // A valid random seed must be in [1, kMaxRandomSeed]. const int kMaxRandomSeed = 99999; -// g_help_flag is true iff the --help flag or an equivalent form is +// g_help_flag is true if the --help flag or an equivalent form is // specified on the command line. GTEST_API_ extern bool g_help_flag; // Returns the current time in milliseconds. GTEST_API_ TimeInMillis GetTimeInMillis(); -// Returns true iff Google Test should use colors in the output. +// Returns true if Google Test should use colors in the output. GTEST_API_ bool ShouldUseColor(bool stdout_is_tty); // Formats the given time in milliseconds as seconds. @@ -266,7 +266,7 @@ GTEST_API_ bool ShouldShard(const char* total_shards_str, GTEST_API_ Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val); // Given the total number of shards, the shard index, and the test id, -// returns true iff the test should be run on this shard. The test id is +// returns true if the test should be run on this shard. The test id is // some arbitrary but unique non-negative integer assigned to each test // method. Assumes that 0 <= shard_index < total_shards. GTEST_API_ bool ShouldRunTestOnShard( @@ -352,7 +352,7 @@ class TestPropertyKeyIs { // TestPropertyKeyIs has NO default constructor. explicit TestPropertyKeyIs(const std::string& key) : key_(key) {} - // Returns true iff the test name of test property matches on key_. + // Returns true if the test name of test property matches on key_. bool operator()(const TestProperty& test_property) const { return test_property.key() == key_; } @@ -385,14 +385,14 @@ class GTEST_API_ UnitTestOptions { // Functions for processing the gtest_filter flag. - // Returns true iff the wildcard pattern matches the string. The + // Returns true if the wildcard pattern matches the string. The // first ':' or '\0' character in pattern marks the end of it. // // This recursive algorithm isn't very efficient, but is clear and // works well enough for matching test names, which are short. static bool PatternMatchesString(const char *pattern, const char *str); - // Returns true iff the user-specified filter matches the test suite + // Returns true if the user-specified filter matches the test suite // name and the test name. static bool FilterMatchesTest(const std::string& test_suite_name, const std::string& test_name); @@ -577,10 +577,10 @@ class GTEST_API_ UnitTestImpl { // Gets the elapsed time, in milliseconds. TimeInMillis elapsed_time() const { return elapsed_time_; } - // Returns true iff the unit test passed (i.e. all test suites passed). + // Returns true if the unit test passed (i.e. all test suites passed). bool Passed() const { return !Failed(); } - // Returns true iff the unit test failed (i.e. some test suite failed + // Returns true if the unit test failed (i.e. some test suite failed // or something outside of all tests failed). bool Failed() const { return failed_test_suite_count() > 0 || ad_hoc_test_result()->Failed(); @@ -911,7 +911,7 @@ class GTEST_API_ UnitTestImpl { // desired. OsStackTraceGetterInterface* os_stack_trace_getter_; - // True iff PostFlagParsingInit() has been called. + // True if PostFlagParsingInit() has been called. bool post_flag_parse_init_performed_; // The random number seed used at the beginning of the test run. diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index 74daaaa..9024f03 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -715,7 +715,7 @@ RE::~RE() { free(const_cast<char*>(pattern_)); } -// Returns true iff regular expression re matches the entire str. +// Returns true if regular expression re matches the entire str. bool RE::FullMatch(const char* str, const RE& re) { if (!re.is_valid_) return false; @@ -723,7 +723,7 @@ bool RE::FullMatch(const char* str, const RE& re) { return regexec(&re.full_regex_, str, 1, &match, 0) == 0; } -// Returns true iff regular expression re matches a substring of str +// Returns true if regular expression re matches a substring of str // (including str itself). bool RE::PartialMatch(const char* str, const RE& re) { if (!re.is_valid_) return false; @@ -764,13 +764,13 @@ void RE::Init(const char* regex) { #elif GTEST_USES_SIMPLE_RE -// Returns true iff ch appears anywhere in str (excluding the +// Returns true if ch appears anywhere in str (excluding the // terminating '\0' character). bool IsInSet(char ch, const char* str) { return ch != '\0' && strchr(str, ch) != nullptr; } -// Returns true iff ch belongs to the given classification. Unlike +// Returns true if ch belongs to the given classification. Unlike // similar functions in <ctype.h>, these aren't affected by the // current locale. bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; } @@ -784,12 +784,12 @@ bool IsAsciiWordChar(char ch) { ('0' <= ch && ch <= '9') || ch == '_'; } -// Returns true iff "\\c" is a supported escape sequence. +// Returns true if "\\c" is a supported escape sequence. bool IsValidEscape(char c) { return (IsAsciiPunct(c) || IsInSet(c, "dDfnrsStvwW")); } -// Returns true iff the given atom (specified by escaped and pattern) +// Returns true if the given atom (specified by escaped and pattern) // matches ch. The result is undefined if the atom is invalid. bool AtomMatchesChar(bool escaped, char pattern_char, char ch) { if (escaped) { // "\\p" where p is pattern_char. @@ -828,7 +828,7 @@ bool ValidateRegex(const char* regex) { bool is_valid = true; - // True iff ?, *, or + can follow the previous atom. + // True if ?, *, or + can follow the previous atom. bool prev_repeatable = false; for (int i = 0; regex[i]; i++) { if (regex[i] == '\\') { // An escape sequence @@ -904,7 +904,7 @@ bool MatchRepetitionAndRegexAtHead( return false; } -// Returns true iff regex matches a prefix of str. regex must be a +// Returns true if regex matches a prefix of str. regex must be a // valid simple regular expression and not start with "^", or the // result is undefined. bool MatchRegexAtHead(const char* regex, const char* str) { @@ -935,7 +935,7 @@ bool MatchRegexAtHead(const char* regex, const char* str) { } } -// Returns true iff regex matches any substring of str. regex must be +// Returns true if regex matches any substring of str. regex must be // a valid simple regular expression, or the result is undefined. // // The algorithm is recursive, but the recursion depth doesn't exceed @@ -964,12 +964,12 @@ RE::~RE() { free(const_cast<char*>(full_pattern_)); } -// Returns true iff regular expression re matches the entire str. +// Returns true if regular expression re matches the entire str. bool RE::FullMatch(const char* str, const RE& re) { return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str); } -// Returns true iff regular expression re matches a substring of str +// Returns true if regular expression re matches a substring of str // (including str itself). bool RE::PartialMatch(const char* str, const RE& re) { return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str); @@ -1330,7 +1330,7 @@ bool ParseInt32(const Message& src_text, const char* str, Int32* value) { // Reads and returns the Boolean environment variable corresponding to // the given flag; if it's not set, returns default_value. // -// The value is considered true iff it's not "0". +// The value is considered true if it's not "0". bool BoolFromGTestEnv(const char* flag, bool default_value) { #if defined(GTEST_GET_BOOL_FROM_ENV_) return GTEST_GET_BOOL_FROM_ENV_(flag, default_value); diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index d6b5630..78b30c6 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -177,7 +177,7 @@ namespace internal { // stack trace. const char kStackTraceMarker[] = "\nStack trace:\n"; -// g_help_flag is true iff the --help flag or an equivalent form is +// g_help_flag is true if the --help flag or an equivalent form is // specified on the command line. bool g_help_flag = false; @@ -217,12 +217,12 @@ GTEST_DEFINE_bool_( GTEST_DEFINE_bool_( break_on_failure, internal::BoolFromGTestEnv("break_on_failure", false), - "True iff a failed assertion should be a debugger break-point."); + "True if a failed assertion should be a debugger break-point."); GTEST_DEFINE_bool_( catch_exceptions, internal::BoolFromGTestEnv("catch_exceptions", true), - "True iff " GTEST_NAME_ + "True if " GTEST_NAME_ " should catch exceptions and treat them as test failures."); GTEST_DEFINE_string_( @@ -273,13 +273,13 @@ GTEST_DEFINE_string_( GTEST_DEFINE_bool_( print_time, internal::BoolFromGTestEnv("print_time", true), - "True iff " GTEST_NAME_ + "True if " GTEST_NAME_ " should display elapsed time in text output."); GTEST_DEFINE_bool_( print_utf8, internal::BoolFromGTestEnv("print_utf8", true), - "True iff " GTEST_NAME_ + "True if " GTEST_NAME_ " prints UTF8 characters as text."); GTEST_DEFINE_int32_( @@ -296,13 +296,13 @@ GTEST_DEFINE_int32_( GTEST_DEFINE_bool_( show_internal_stack_frames, false, - "True iff " GTEST_NAME_ " should include internal stack frames when " + "True if " GTEST_NAME_ " should include internal stack frames when " "printing test failure stack traces."); GTEST_DEFINE_bool_( shuffle, internal::BoolFromGTestEnv("shuffle", false), - "True iff " GTEST_NAME_ + "True if " GTEST_NAME_ " should randomize tests' order on every run."); GTEST_DEFINE_int32_( @@ -354,7 +354,7 @@ UInt32 Random::Generate(UInt32 range) { return state_ % range; } -// GTestIsInitialized() returns true iff the user has initialized +// GTestIsInitialized() returns true if the user has initialized // Google Test. Useful for catching the user mistake of not initializing // Google Test before calling RUN_ALL_TESTS(). static bool GTestIsInitialized() { return GetArgvs().size() > 0; } @@ -371,17 +371,17 @@ static int SumOverTestSuiteList(const std::vector<TestSuite*>& case_list, return sum; } -// Returns true iff the test suite passed. +// Returns true if the test suite passed. static bool TestSuitePassed(const TestSuite* test_suite) { return test_suite->should_run() && test_suite->Passed(); } -// Returns true iff the test suite failed. +// Returns true if the test suite failed. static bool TestSuiteFailed(const TestSuite* test_suite) { return test_suite->should_run() && test_suite->Failed(); } -// Returns true iff test_suite contains at least one test that should +// Returns true if test_suite contains at least one test that should // run. static bool ShouldRunTestSuite(const TestSuite* test_suite) { return test_suite->should_run(); @@ -482,7 +482,7 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() { return result.string(); } -// Returns true iff the wildcard pattern matches the string. The +// Returns true if the wildcard pattern matches the string. The // first ':' or '\0' character in pattern marks the end of it. // // This recursive algorithm isn't very efficient, but is clear and @@ -525,7 +525,7 @@ bool UnitTestOptions::MatchesFilter( } } -// Returns true iff the user-specified filter matches the test suite +// Returns true if the user-specified filter matches the test suite // name and the test name. bool UnitTestOptions::FilterMatchesTest(const std::string& test_suite_name, const std::string& test_name) { @@ -910,7 +910,7 @@ const char* String::Utf16ToAnsi(LPCWSTR utf16_str) { #endif // GTEST_OS_WINDOWS_MOBILE -// Compares two C strings. Returns true iff they have the same content. +// Compares two C strings. Returns true if they have the same content. // // Unlike strcmp(), this function can handle NULL argument(s). A NULL // C string is considered different to any non-NULL C string, @@ -1320,7 +1320,7 @@ std::vector<std::string> SplitEscapedString(const std::string& str) { // lhs_value: "5" // rhs_value: "6" // -// The ignoring_case parameter is true iff the assertion is a +// The ignoring_case parameter is true if the assertion is a // *_STRCASEEQ*. When it's true, the string "Ignoring case" will // be inserted into the message. AssertionResult EqFailure(const char* lhs_expression, @@ -1563,7 +1563,7 @@ namespace { // Helper functions for implementing IsSubString() and IsNotSubstring(). -// This group of overloaded functions return true iff needle is a +// This group of overloaded functions return true if needle is a // substring of haystack. NULL is considered a substring of itself // only. @@ -1865,7 +1865,7 @@ std::string String::ShowWideCString(const wchar_t * wide_c_str) { return internal::WideStringToUtf8(wide_c_str, -1); } -// Compares two wide C strings. Returns true iff they have the same +// Compares two wide C strings. Returns true if they have the same // content. // // Unlike wcscmp(), this function can handle NULL argument(s). A NULL @@ -1910,7 +1910,7 @@ AssertionResult CmpHelperSTRNE(const char* s1_expression, << " vs " << PrintToString(s2); } -// Compares two C strings, ignoring case. Returns true iff they have +// Compares two C strings, ignoring case. Returns true if they have // the same content. // // Unlike strcasecmp(), this function can handle NULL argument(s). A @@ -1922,7 +1922,7 @@ bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) { return posix::StrCaseCmp(lhs, rhs) == 0; } - // Compares two wide C strings, ignoring case. Returns true iff they + // Compares two wide C strings, ignoring case. Returns true if they // have the same content. // // Unlike wcscasecmp(), this function can handle NULL argument(s). @@ -1956,7 +1956,7 @@ bool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs, #endif // OS selector } -// Returns true iff str ends with the given suffix, ignoring case. +// Returns true if str ends with the given suffix, ignoring case. // Any string is considered to end with an empty suffix. bool String::EndsWithCaseInsensitive( const std::string& str, const std::string& suffix) { @@ -2198,12 +2198,12 @@ static bool TestPartSkipped(const TestPartResult& result) { return result.skipped(); } -// Returns true iff the test was skipped. +// Returns true if the test was skipped. bool TestResult::Skipped() const { return !Failed() && CountIf(test_part_results_, TestPartSkipped) > 0; } -// Returns true iff the test failed. +// Returns true if the test failed. bool TestResult::Failed() const { for (int i = 0; i < total_part_count(); ++i) { if (GetTestPartResult(i).failed()) @@ -2212,22 +2212,22 @@ bool TestResult::Failed() const { return false; } -// Returns true iff the test part fatally failed. +// Returns true if the test part fatally failed. static bool TestPartFatallyFailed(const TestPartResult& result) { return result.fatally_failed(); } -// Returns true iff the test fatally failed. +// Returns true if the test fatally failed. bool TestResult::HasFatalFailure() const { return CountIf(test_part_results_, TestPartFatallyFailed) > 0; } -// Returns true iff the test part non-fatally failed. +// Returns true if the test part non-fatally failed. static bool TestPartNonfatallyFailed(const TestPartResult& result) { return result.nonfatally_failed(); } -// Returns true iff the test has a non-fatal failure. +// Returns true if the test has a non-fatal failure. bool TestResult::HasNonfatalFailure() const { return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0; } @@ -2523,18 +2523,18 @@ void Test::Run() { this, &Test::TearDown, "TearDown()"); } -// Returns true iff the current test has a fatal failure. +// Returns true if the current test has a fatal failure. bool Test::HasFatalFailure() { return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure(); } -// Returns true iff the current test has a non-fatal failure. +// Returns true if the current test has a non-fatal failure. bool Test::HasNonfatalFailure() { return internal::GetUnitTestImpl()->current_test_result()-> HasNonfatalFailure(); } -// Returns true iff the current test was skipped. +// Returns true if the current test was skipped. bool Test::IsSkipped() { return internal::GetUnitTestImpl()->current_test_result()->Skipped(); } @@ -2633,7 +2633,7 @@ class TestNameIs { explicit TestNameIs(const char* name) : name_(name) {} - // Returns true iff the test name of test_info matches name_. + // Returns true if the test name of test_info matches name_. bool operator()(const TestInfo * test_info) const { return test_info && test_info->name() == name_; } @@ -2992,7 +2992,7 @@ static const char* GetAnsiColorCode(GTestColor color) { #endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE -// Returns true iff Google Test should use colors in the output. +// Returns true if Google Test should use colors in the output. bool ShouldUseColor(bool stdout_is_tty) { const char* const gtest_color = GTEST_FLAG(color).c_str(); @@ -4669,10 +4669,10 @@ internal::TimeInMillis UnitTest::elapsed_time() const { return impl()->elapsed_time(); } -// Returns true iff the unit test passed (i.e. all test suites passed). +// Returns true if the unit test passed (i.e. all test suites passed). bool UnitTest::Passed() const { return impl()->Passed(); } -// Returns true iff the unit test failed (i.e. some test suite failed +// Returns true if the unit test failed (i.e. some test suite failed // or something outside of all tests failed). bool UnitTest::Failed() const { return impl()->Failed(); } @@ -5111,7 +5111,7 @@ class TestSuiteNameIs { // Constructor. explicit TestSuiteNameIs(const std::string& name) : name_(name) {} - // Returns true iff the name of test_suite matches name_. + // Returns true if the name of test_suite matches name_. bool operator()(const TestSuite* test_suite) const { return test_suite != nullptr && strcmp(test_suite->name(), name_.c_str()) == 0; @@ -5182,7 +5182,7 @@ static void TearDownEnvironment(Environment* env) { env->TearDown(); } // All other functions called from RunAllTests() may safely assume that // parameterized tests are ready to be counted and run. bool UnitTestImpl::RunAllTests() { - // True iff Google Test is initialized before RUN_ALL_TESTS() is called. + // True if Google Test is initialized before RUN_ALL_TESTS() is called. const bool gtest_is_initialized_before_run_all_tests = GTestIsInitialized(); // Do not run any test if the --help flag was specified. @@ -5198,7 +5198,7 @@ bool UnitTestImpl::RunAllTests() { // protocol. internal::WriteToShardStatusFileIfNeeded(); - // True iff we are in a subprocess for running a thread-safe-style + // True if we are in a subprocess for running a thread-safe-style // death test. bool in_subprocess_for_death_test = false; @@ -5231,7 +5231,7 @@ bool UnitTestImpl::RunAllTests() { random_seed_ = GTEST_FLAG(shuffle) ? GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0; - // True iff at least one test has failed. + // True if at least one test has failed. bool failed = false; TestEventListener* repeater = listeners()->repeater(); @@ -5429,7 +5429,7 @@ Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) { } // Given the total number of shards, the shard index, and the test id, -// returns true iff the test should be run on this shard. The test id is +// returns true if the test should be run on this shard. The test id is // some arbitrary but unique non-negative integer assigned to each test // method. Assumes that 0 <= shard_index < total_shards. bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { @@ -6003,7 +6003,7 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { void ParseGoogleTestFlagsOnly(int* argc, char** argv) { ParseGoogleTestFlagsOnlyImpl(argc, argv); - // Fix the value of *_NSGetArgc() on macOS, but iff + // Fix the value of *_NSGetArgc() on macOS, but if // *_NSGetArgv() == argv // Only applicable to char** version of argv #if GTEST_OS_MAC diff --git a/googletest/test/googletest-death-test-test.cc b/googletest/test/googletest-death-test-test.cc index 272b9c3..6c71fd8 100644 --- a/googletest/test/googletest-death-test-test.cc +++ b/googletest/test/googletest-death-test-test.cc @@ -139,7 +139,7 @@ class TestForDeathTest : public testing::Test { DieInside("MemberFunction"); } - // True iff MemberFunction() should die. + // True if MemberFunction() should die. bool should_die_; const FilePath original_dir_; }; @@ -156,7 +156,7 @@ class MayDie { } private: - // True iff MemberFunction() should die. + // True if MemberFunction() should die. bool should_die_; }; @@ -551,7 +551,7 @@ TEST_F(TestForDeathTest, ErrorMessageMismatch) { }, "died but not with expected error"); } -// On exit, *aborted will be true iff the EXPECT_DEATH() statement +// On exit, *aborted will be true if the EXPECT_DEATH() statement // aborted the function. void ExpectDeathTestHelper(bool* aborted) { *aborted = true; diff --git a/googletest/test/googletest-throw-on-failure-test.py b/googletest/test/googletest-throw-on-failure-test.py index 7e4b158..a38cd33 100755 --- a/googletest/test/googletest-throw-on-failure-test.py +++ b/googletest/test/googletest-throw-on-failure-test.py @@ -86,7 +86,7 @@ class ThrowOnFailureTest(gtest_test_utils.TestCase): variable; None if the variable should be unset. flag_value: value of the --gtest_break_on_failure flag; None if the flag should not be present. - should_fail: True iff the program is expected to fail. + should_fail: True if the program is expected to fail. """ SetEnvVar(THROW_ON_FAILURE, env_var_value) diff --git a/googletest/test/gtest_environment_test.cc b/googletest/test/gtest_environment_test.cc index fea542a..58908e6 100644 --- a/googletest/test/gtest_environment_test.cc +++ b/googletest/test/gtest_environment_test.cc @@ -116,7 +116,7 @@ void Check(bool condition, const char* msg) { } } -// Runs the tests. Return true iff successful. +// Runs the tests. Return true if successful. // // The 'failure' parameter specifies the type of failure that should // be generated by the global set-up. diff --git a/googletest/test/gtest_pred_impl_unittest.cc b/googletest/test/gtest_pred_impl_unittest.cc index 049ef98..4d77896 100644 --- a/googletest/test/gtest_pred_impl_unittest.cc +++ b/googletest/test/gtest_pred_impl_unittest.cc @@ -144,10 +144,10 @@ class Predicate1Test : public testing::Test { } } - // true iff the test function is expected to run to finish. + // true if the test function is expected to run to finish. static bool expected_to_finish_; - // true iff the test function did run to finish. + // true if the test function did run to finish. static bool finished_; static int n1_; @@ -539,10 +539,10 @@ class Predicate2Test : public testing::Test { } } - // true iff the test function is expected to run to finish. + // true if the test function is expected to run to finish. static bool expected_to_finish_; - // true iff the test function did run to finish. + // true if the test function did run to finish. static bool finished_; static int n1_; @@ -976,10 +976,10 @@ class Predicate3Test : public testing::Test { } } - // true iff the test function is expected to run to finish. + // true if the test function is expected to run to finish. static bool expected_to_finish_; - // true iff the test function did run to finish. + // true if the test function did run to finish. static bool finished_; static int n1_; @@ -1455,10 +1455,10 @@ class Predicate4Test : public testing::Test { } } - // true iff the test function is expected to run to finish. + // true if the test function is expected to run to finish. static bool expected_to_finish_; - // true iff the test function did run to finish. + // true if the test function did run to finish. static bool finished_; static int n1_; @@ -1976,10 +1976,10 @@ class Predicate5Test : public testing::Test { } } - // true iff the test function is expected to run to finish. + // true if the test function is expected to run to finish. static bool expected_to_finish_; - // true iff the test function did run to finish. + // true if the test function did run to finish. static bool finished_; static int n1_; diff --git a/googletest/test/gtest_premature_exit_test.cc b/googletest/test/gtest_premature_exit_test.cc index 0920a97..777a8bf 100644 --- a/googletest/test/gtest_premature_exit_test.cc +++ b/googletest/test/gtest_premature_exit_test.cc @@ -45,7 +45,7 @@ namespace { class PrematureExitTest : public Test { public: - // Returns true iff the given file exists. + // Returns true if the given file exists. static bool FileExists(const char* filepath) { StatStruct stat; return Stat(filepath, &stat) == 0; @@ -61,7 +61,7 @@ class PrematureExitTest : public Test { } } - // Returns true iff the premature-exit file exists. + // Returns true if the premature-exit file exists. bool PrematureExitFileExists() const { return FileExists(premature_exit_file_path_); } diff --git a/googletest/test/gtest_test_utils.py b/googletest/test/gtest_test_utils.py index 9a4dcb8..abd56ec 100755 --- a/googletest/test/gtest_test_utils.py +++ b/googletest/test/gtest_test_utils.py @@ -215,10 +215,10 @@ class Subprocess: Returns: An object that represents outcome of the executed process. It has the following attributes: - terminated_by_signal True iff the child process has been terminated + terminated_by_signal True if the child process has been terminated by a signal. signal Sygnal that terminated the child process. - exited True iff the child process exited normally. + exited True if the child process exited normally. exit_code The code with which the child process exited. output Child process's stdout and stderr output combined in a string. diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index d481056..07ee171 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -2167,12 +2167,12 @@ static Environment* record_property_env GTEST_ATTRIBUTE_UNUSED_ = // First, some predicates and predicate-formatters needed by the tests. -// Returns true iff the argument is an even number. +// Returns true if the argument is an even number. bool IsEven(int n) { return (n % 2) == 0; } -// A functor that returns true iff the argument is an even number. +// A functor that returns true if the argument is an even number. struct IsEvenFunctor { bool operator()(int n) { return IsEven(n); } }; @@ -2216,12 +2216,12 @@ struct AssertIsEvenFunctor { } }; -// Returns true iff the sum of the arguments is an even number. +// Returns true if the sum of the arguments is an even number. bool SumIsEven2(int n1, int n2) { return IsEven(n1 + n2); } -// A functor that returns true iff the sum of the arguments is an even +// A functor that returns true if the sum of the arguments is an even // number. struct SumIsEven3Functor { bool operator()(int n1, int n2, int n3) { |