diff options
Diffstat (limited to 'utils/unittest/googletest/include/gtest')
10 files changed, 64 insertions, 64 deletions
diff --git a/utils/unittest/googletest/include/gtest/gtest-test-part.h b/utils/unittest/googletest/include/gtest/gtest-test-part.h index 8aeea14984..3059005316 100644 --- a/utils/unittest/googletest/include/gtest/gtest-test-part.h +++ b/utils/unittest/googletest/include/gtest/gtest-test-part.h @@ -85,16 +85,16 @@ 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 passed. + // Returns true if the test part passed. bool passed() const { return type_ == kSuccess; } - // Returns true iff the test part failed. + // Returns true if the test part failed. bool failed() 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; } private: Type type_; diff --git a/utils/unittest/googletest/include/gtest/gtest.h b/utils/unittest/googletest/include/gtest/gtest.h index 1734c4432e..d66aaa9ed8 100644 --- a/utils/unittest/googletest/include/gtest/gtest.h +++ b/utils/unittest/googletest/include/gtest/gtest.h @@ -270,7 +270,7 @@ class GTEST_API_ AssertionResult { // Used in the EXPECT_TRUE/FALSE(bool_expression). explicit AssertionResult(bool success) : success_(success) {} - // 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. @@ -381,13 +381,13 @@ class GTEST_API_ Test { // class. static void TearDownTestCase() {} - // 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 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(); } @@ -417,7 +417,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 case. static bool HasSameFixtureClass(); @@ -520,16 +520,16 @@ 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 !Failed(); } - // 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. @@ -720,8 +720,8 @@ class GTEST_API_ TestInfo { // value-parameterized test. const internal::scoped_ptr<const ::std::string> value_param_; 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. internal::TestFactoryBase* const factory_; // The factory that creates @@ -787,10 +787,10 @@ class GTEST_API_ TestCase { // Gets the number of all tests in this test case. int total_test_count() const; - // Returns true iff the test case passed. + // Returns true if the test case passed. bool Passed() const { return !Failed(); } - // Returns true iff the test case failed. + // Returns true if the test case failed. bool Failed() const { return failed_test_count() > 0; } // Returns the elapsed time, in milliseconds. @@ -842,17 +842,17 @@ class GTEST_API_ TestCase { // needed for catching exceptions thrown from TearDownTestCase(). void RunTearDownTestCase() { (*tear_down_tc_)(); } - // 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 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 test is disabled. + // Returns true if test is disabled. static bool TestDisabled(const TestInfo* test_info) { return test_info->is_disabled_; } @@ -884,7 +884,7 @@ class GTEST_API_ TestCase { Test::SetUpTestCaseFunc set_up_tc_; // Pointer to the function that tears down the test case. Test::TearDownTestCaseFunc tear_down_tc_; - // True iff any test in this test case should run. + // True if any test in this test case should run. bool should_run_; // Elapsed time, in milliseconds. TimeInMillis elapsed_time_; @@ -1155,10 +1155,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 cases passed). + // Returns true if the unit test passed (i.e. all test cases passed). bool Passed() const; - // Returns true iff the unit test failed (i.e. some test case failed + // Returns true if the unit test failed (i.e. some test case failed // or something outside of all tests failed). bool Failed() const; @@ -1339,7 +1339,7 @@ GTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression, BiggestInt actual); // The helper class for {ASSERT|EXPECT}_EQ. The template argument -// lhs_is_null_literal is true iff the first argument to ASSERT_EQ() +// lhs_is_null_literal is true if the first argument to ASSERT_EQ() // is a null pointer literal. The following default implementation is // for lhs_is_null_literal being false. template <bool lhs_is_null_literal> @@ -2043,7 +2043,7 @@ GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2, __FILE__, __LINE__, ::testing::Message() << (message)) // 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/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h b/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h index 7bac2bd872..329c646a56 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h @@ -256,7 +256,7 @@ InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag(); // 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. @@ -266,7 +266,7 @@ InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag(); // 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/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h b/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h index 823c6bdc25..8331891faa 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h @@ -111,7 +111,7 @@ class GTEST_API_ FilePath { const FilePath& base_name, const char* extension); - // Returns true iff the path is NULL or "". + // Returns true if the path is NULL or "". bool IsEmpty() const { return c_str() == NULL || *c_str() == '\0'; } // If input name has a trailing separator character, removes it and returns diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-internal-inl.h b/utils/unittest/googletest/include/gtest/internal/gtest-internal-inl.h index 6554cfc07e..838024fa80 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-internal-inl.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-internal-inl.h @@ -37,7 +37,7 @@ #ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_ #define GTEST_SRC_GTEST_INTERNAL_INL_H_ -// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is +// GTEST_IMPLEMENTATION_ is defined to 1 if the current translation unit is // part of Google Test's implementation; otherwise it's undefined. #if !GTEST_IMPLEMENTATION_ // A user is trying to include this from his code - just say no. @@ -99,14 +99,14 @@ const char kThrowOnFailureFlag[] = "throw_on_failure"; // 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. @@ -258,7 +258,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( @@ -341,7 +341,7 @@ class TestPropertyKeyIs { explicit TestPropertyKeyIs(const char* 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 String(test_property.key()).Compare(key_) == 0; } @@ -374,14 +374,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 case + // Returns true if the user-specified filter matches the test case // name and the test name. static bool FilterMatchesTest(const String &test_case_name, const String &test_name); @@ -550,10 +550,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 cases passed). + // Returns true if the unit test passed (i.e. all test cases passed). bool Passed() const { return !Failed(); } - // Returns true iff the unit test failed (i.e. some test case failed + // Returns true if the unit test failed (i.e. some test case failed // or something outside of all tests failed). bool Failed() const { return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed(); @@ -870,7 +870,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/utils/unittest/googletest/include/gtest/internal/gtest-internal.h b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h index f8a5cc9447..c92a16fab6 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-internal.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h @@ -287,7 +287,7 @@ GTEST_FORMAT_CHAR_PTR_IMPL_(const wchar_t) // 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, @@ -413,14 +413,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. @@ -784,7 +784,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; @@ -860,7 +860,7 @@ struct AddReference<T&> { typedef T& type; }; // NOLINT GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T)) // ImplicitlyConvertible<From, To>::value is a compile-time bool -// constant that's true iff type From can be implicitly converted to +// constant that's true if type From can be implicitly converted to // type To. template <typename From, typename To> class ImplicitlyConvertible { @@ -913,7 +913,7 @@ template <typename From, typename To> const bool ImplicitlyConvertible<From, To>::value; // IsAProtocolMessage<T>::value is a compile-time bool constant that's -// true iff T is type ProtocolMessage, proto2::Message, or a subclass +// true if T is type ProtocolMessage, proto2::Message, or a subclass // of those. template <typename T> struct IsAProtocolMessage diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-port.h b/utils/unittest/googletest/include/gtest/internal/gtest-port.h index 58f6cafa75..9d226e9e00 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-port.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-port.h @@ -266,7 +266,7 @@ # include <io.h> #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 # define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS) #endif @@ -307,7 +307,7 @@ # endif // _HAS_EXCEPTIONS # define GTEST_HAS_EXCEPTIONS _HAS_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 @@ -315,7 +315,7 @@ // 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 @@ -374,13 +374,13 @@ # 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__) && (GTEST_GCC_VER_ >= 40302) # ifdef __GXX_RTTI @@ -832,9 +832,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). // // TODO(wan@google.com): make FullMatch() and PartialMatch() work @@ -1181,7 +1181,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/utils/unittest/googletest/include/gtest/internal/gtest-string.h b/utils/unittest/googletest/include/gtest/internal/gtest-string.h index dc3a07be88..396359137a 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-string.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-string.h @@ -126,7 +126,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, @@ -143,7 +143,7 @@ class GTEST_API_ String { // the converted string in double quotes. static String ShowWideCStringQuoted(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 @@ -151,7 +151,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). @@ -160,7 +160,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). @@ -237,7 +237,7 @@ class GTEST_API_ String { operator ::string() const { return ::string(c_str(), length()); } #endif // GTEST_HAS_GLOBAL_STRING - // Returns true iff this is an empty string (i.e. ""). + // Returns true if this is an empty string (i.e. ""). bool empty() const { return (c_str() != NULL) && (length() == 0); } // Compares this with another String. @@ -245,23 +245,23 @@ class GTEST_API_ String { // if this is greater than rhs. int Compare(const String& rhs) const; - // Returns true iff this String equals the given C string. A NULL + // Returns true if this String equals the given C string. A NULL // string and a non-NULL string are considered not equal. bool operator==(const char* a_c_str) const { return Compare(a_c_str) == 0; } - // Returns true iff this String is less than the given String. A + // Returns true if this String is less than the given String. A // NULL string is considered less than "". bool operator<(const String& rhs) const { return Compare(rhs) < 0; } - // Returns true iff this String doesn't equal the given C string. A NULL + // Returns true if this String doesn't equal the given C string. A NULL // string and a non-NULL string are considered not equal. bool operator!=(const char* a_c_str) const { return !(*this == a_c_str); } - // Returns true iff this String ends with the given suffix. *Any* + // Returns true if this String ends with the given suffix. *Any* // String is considered to end with a NULL or empty suffix. bool EndsWith(const char* suffix) const; - // Returns true iff this String ends with the given suffix, not considering + // Returns true if this String ends with the given suffix, not considering // case. Any String is considered to end with a NULL or empty suffix. bool EndsWithCaseInsensitive(const char* suffix) const; diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-tuple.h b/utils/unittest/googletest/include/gtest/internal/gtest-tuple.h index d1af50e188..6d52d43621 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-tuple.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-tuple.h @@ -135,7 +135,7 @@ struct AddRef<T&> { typedef T& type; }; // NOLINT template <int k> class Get; // A helper for implementing tuple_element<k, T>. kIndexValid is true -// iff k < the number of fields in tuple type T. +// if k < the number of fields in tuple type T. template <bool kIndexValid, int kIndex, class Tuple> struct TupleElement; diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h b/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h index b7b01b0948..77cc0f9edf 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h @@ -90,7 +90,7 @@ 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. |