diff --git a/ci/linux-presubmit.sh b/ci/linux-presubmit.sh index c598c573a..802bca1ed 100644 --- a/ci/linux-presubmit.sh +++ b/ci/linux-presubmit.sh @@ -39,7 +39,7 @@ fi # Use Bazel Vendor mode to reduce reliance on external dependencies. # See https://bazel.build/external/vendor and the Dockerfile for -# an explaination of how this works. +# an explanation of how this works. if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f "${KOKORO_GFILE_DIR}/distdir/googletest_vendor.tar.gz" ]]; then DOCKER_EXTRA_ARGS="--mount type=bind,source=${KOKORO_GFILE_DIR}/distdir,target=/distdir,readonly --env=BAZEL_VENDOR_ARCHIVE=/distdir/googletest_vendor.tar.gz ${DOCKER_EXTRA_ARGS:-}" BAZEL_EXTRA_ARGS="--vendor_dir=/googletest_vendor ${BAZEL_EXTRA_ARGS:-}" diff --git a/googlemock/src/gmock-matchers.cc b/googlemock/src/gmock-matchers.cc index 277add6b6..482d097d9 100644 --- a/googlemock/src/gmock-matchers.cc +++ b/googlemock/src/gmock-matchers.cc @@ -373,10 +373,10 @@ bool UnorderedElementsAreMatcherImplBase::VerifyMatchMatrix( return true; } - const bool is_exact_match_with_size_discrepency = + const bool is_exact_match_with_size_discrepancy = match_flags() == UnorderedMatcherRequire::ExactMatch && matrix.LhsSize() != matrix.RhsSize(); - if (is_exact_match_with_size_discrepency) { + if (is_exact_match_with_size_discrepancy) { // The element count doesn't match. If the container is empty, // there's no need to explain anything as Google Mock already // prints the empty container. Otherwise we just need to show @@ -386,7 +386,7 @@ bool UnorderedElementsAreMatcherImplBase::VerifyMatchMatrix( } } - bool result = !is_exact_match_with_size_discrepency; + bool result = !is_exact_match_with_size_discrepancy; ::std::vector element_matched(matrix.LhsSize(), 0); ::std::vector matcher_matched(matrix.RhsSize(), 0); diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index 1bc304088..966510b81 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -1013,7 +1013,7 @@ TEST(DoDefaultTest, ReturnsBuiltInDefaultValueByDefault) { // Tests that DoDefault() throws (when exceptions are enabled) or aborts // the process when there is no built-in default value for the return type. -TEST(DoDefaultDeathTest, DiesForUnknowType) { +TEST(DoDefaultDeathTest, DiesForUnknownType) { MockClass mock; EXPECT_CALL(mock, Foo()).WillRepeatedly(DoDefault()); #if GTEST_HAS_EXCEPTIONS diff --git a/googlemock/test/gmock-matchers-comparisons_test.cc b/googlemock/test/gmock-matchers-comparisons_test.cc index 3a21a9a7e..feb3714eb 100644 --- a/googlemock/test/gmock-matchers-comparisons_test.cc +++ b/googlemock/test/gmock-matchers-comparisons_test.cc @@ -1201,7 +1201,7 @@ TEST(RefTest, CanDescribeSelf) { EXPECT_EQ(ss.str(), Describe(m)); } -// Test that Ref(non_const_varialbe) can be used as a matcher for a +// Test that Ref(non_const_variable) can be used as a matcher for a // const reference. TEST(RefTest, CanBeUsedAsMatcherForConstReference) { int a = 0; diff --git a/googlemock/test/gmock-matchers-containers_test.cc b/googlemock/test/gmock-matchers-containers_test.cc index a5e1aebb1..a62c626ab 100644 --- a/googlemock/test/gmock-matchers-containers_test.cc +++ b/googlemock/test/gmock-matchers-containers_test.cc @@ -2069,14 +2069,14 @@ TEST(ElementsAreArrayTest, WorksWithContainerWithIteratorWithNoMemberTypes) { // Tests using ElementsAre() and ElementsAreArray() with stream-like // "containers". -TEST(ElemensAreStreamTest, WorksForStreamlike) { +TEST(ElementsAreStreamTest, WorksForStreamlike) { const int a[5] = {1, 2, 3, 4, 5}; Streamlike s(std::begin(a), std::end(a)); EXPECT_THAT(s, ElementsAre(1, 2, 3, 4, 5)); EXPECT_THAT(s, Not(ElementsAre(2, 1, 4, 5, 3))); } -TEST(ElemensAreArrayStreamTest, WorksForStreamlike) { +TEST(ElementsAreArrayStreamTest, WorksForStreamlike) { const int a[5] = {1, 2, 3, 4, 5}; Streamlike s(std::begin(a), std::end(a)); diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index 287b249dc..d13a4827f 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -1021,7 +1021,7 @@ TEST(UnexpectedCallTest, GeneratesFailureForVoidFunction) { // Tests that an unexpected non-void function generates the right // failure message. -TEST(UnexpectedCallTest, GeneartesFailureForNonVoidFunction) { +TEST(UnexpectedCallTest, GeneratesFailureForNonVoidFunction) { MockB b1; EXPECT_CALL(b1, DoB(1)); b1.DoB(1); @@ -1385,7 +1385,7 @@ TEST(SequenceTest, Retirement) { // Tests Expectation. -TEST(ExpectationTest, ConstrutorsWork) { +TEST(ExpectationTest, ConstructorsWork) { MockA a; Expectation e1; // Default ctor. diff --git a/googlemock/test/gmock_leak_test.py b/googlemock/test/gmock_leak_test.py index 8b02bc465..6c8a919fd 100755 --- a/googlemock/test/gmock_leak_test.py +++ b/googlemock/test/gmock_leak_test.py @@ -91,7 +91,7 @@ class GMockLeakTest(gmock_test_utils.TestCase): ).exit_code, ) - def testCatchesLeakedMockWhenEnabledWithExplictFlagValue(self): + def testCatchesLeakedMockWhenEnabledWithExplicitFlagValue(self): self.assertNotEqual( 0, gmock_test_utils.Subprocess( diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index d1704bb75..11957684b 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -1187,7 +1187,7 @@ void UniversalTersePrint(const T& value, ::std::ostream* os) { // NUL-terminated string. template void UniversalPrint(const T& value, ::std::ostream* os) { - // A workarond for the bug in VC++ 7.1 that prevents us from instantiating + // A workaround for the bug in VC++ 7.1 that prevents us from instantiating // UniversalPrinter with T directly. typedef T T1; UniversalPrinter::Print(value, os); diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h index 716779346..05acb696c 100644 --- a/googletest/include/gtest/internal/gtest-param-util.h +++ b/googletest/include/gtest/internal/gtest-param-util.h @@ -613,7 +613,7 @@ class [[nodiscard]] ParameterizedTestSuiteInfo } // for test_info if (!generated_instantiations) { - // There are no generaotrs, or they all generate nothing ... + // There are no generators, or they all generate nothing ... InsertSyntheticTestCase(GetTestSuiteName(), code_location_, !tests_.empty()); } @@ -762,7 +762,7 @@ class [[nodiscard]] ParameterizedTestSuiteRegistry { }; // Keep track of what type-parameterized test suite are defined and -// where as well as which are intatiated. This allows susequently +// where as well as which are instantiated. This allows subsequently // identifying suits that are defined but never used. class [[nodiscard]] TypeParameterizedTestSuiteRegistry { public: diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index d34a693e4..5aba6cb07 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -729,7 +729,7 @@ bool RE::PartialMatch(const char* str, const RE& re) { void RE::Init(const char* regex) { pattern_ = regex; - // NetBSD (and Android, which takes its regex implemntation from NetBSD) does + // NetBSD (and Android, which takes its regex implementation from NetBSD) does // not include the GNU regex extensions (such as Perl style character classes // like \w) in REG_EXTENDED. REG_EXTENDED is only specified to include the // [[:alpha:]] style character classes. Enable REG_GNU wherever it is defined diff --git a/googletest/test/googletest-output-test_.cc b/googletest/test/googletest-output-test_.cc index e3560c018..79f58cc30 100644 --- a/googletest/test/googletest-output-test_.cc +++ b/googletest/test/googletest-output-test_.cc @@ -62,7 +62,7 @@ void TestEq1(int x) { ASSERT_EQ(1, x); } // This function calls a test subroutine, catches the fatal failure it // generates, and then returns early. void TryTestSubroutine() { - // Calls a subrountine that yields a fatal failure. + // Calls a subroutine that yields a fatal failure. TestEq1(2); // Catches the fatal failure and aborts the test. @@ -124,7 +124,7 @@ TEST(FatalFailureTest, FatalFailureInSubroutine) { TEST(FatalFailureTest, FatalFailureInNestedSubroutine) { printf("(expecting a failure that x should be 1)\n"); - // Calls a subrountine that yields a fatal failure. + // Calls a subroutine that yields a fatal failure. TryTestSubroutine(); // Catches the fatal failure and aborts the test. diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc index 10d429c9a..574885cb3 100644 --- a/googletest/test/googletest-param-test-test.cc +++ b/googletest/test/googletest-param-test-test.cc @@ -948,7 +948,7 @@ TEST_F(PREFIX_WITH_MACRO(NamingTestNonParametrized), EXPECT_STREQ("FooSomeTestName", test_info->name()); } -TEST(MacroNameing, LookupNames) { +TEST(MacroNaming, LookupNames) { std::set know_suite_names, know_test_names; const auto& ins = testing::UnitTest::GetInstance(); diff --git a/googletest/test/googletest-port-test.cc b/googletest/test/googletest-port-test.cc index 24fcd9d93..fcc5261a0 100644 --- a/googletest/test/googletest-port-test.cc +++ b/googletest/test/googletest-port-test.cc @@ -255,11 +255,11 @@ TEST(FormatFileLocationTest, FormatsUnknownFile) { EXPECT_PRED_FORMAT2(IsSubstring, "42", FormatFileLocation(nullptr, 42)); } -TEST(FormatFileLocationTest, FormatsUknownLine) { +TEST(FormatFileLocationTest, FormatsUnknownLine) { EXPECT_EQ("foo.cc:", FormatFileLocation("foo.cc", -1)); } -TEST(FormatFileLocationTest, FormatsUknownFileAndLine) { +TEST(FormatFileLocationTest, FormatsUnknownFileAndLine) { EXPECT_EQ("unknown file:", FormatFileLocation(nullptr, -1)); } @@ -268,16 +268,16 @@ TEST(FormatCompilerIndependentFileLocationTest, FormatsFileLocation) { EXPECT_EQ("foo.cc:42", FormatCompilerIndependentFileLocation("foo.cc", 42)); } -TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFile) { +TEST(FormatCompilerIndependentFileLocationTest, FormatsUnknownFile) { EXPECT_EQ("unknown file:42", FormatCompilerIndependentFileLocation(nullptr, 42)); } -TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownLine) { +TEST(FormatCompilerIndependentFileLocationTest, FormatsUnknownLine) { EXPECT_EQ("foo.cc", FormatCompilerIndependentFileLocation("foo.cc", -1)); } -TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFileAndLine) { +TEST(FormatCompilerIndependentFileLocationTest, FormatsUnknownFileAndLine) { EXPECT_EQ("unknown file", FormatCompilerIndependentFileLocation(nullptr, -1)); } @@ -820,7 +820,7 @@ TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithRepetition) { EXPECT_TRUE(MatchRegexAtHead("a?b", "ab")); } -TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithRepetionOfEscapeSequence) { +TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithRepetitionOfEscapeSequence) { EXPECT_FALSE(MatchRegexAtHead("\\.+a", "abc")); EXPECT_FALSE(MatchRegexAtHead("\\s?b", " b")); @@ -985,7 +985,7 @@ class NoDefaultConstructor { NoDefaultConstructor(const NoDefaultConstructor&) = default; }; -TEST(ThreadLocalTest, ValueDefaultContructorIsNotRequiredForParamVersion) { +TEST(ThreadLocalTest, ValueDefaultConstructorIsNotRequiredForParamVersion) { ThreadLocal bar(NoDefaultConstructor("foo")); bar.pointer(); } diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 8ce64d386..59ce1a632 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -1243,7 +1243,7 @@ TEST_F(ScopedFakeTestPartResultReporterWithThreadsTest, typedef ScopedFakeTestPartResultReporterTest ExpectFatalFailureTest; -TEST_F(ExpectFatalFailureTest, CatchesFatalFaliure) { +TEST_F(ExpectFatalFailureTest, CatchesFatalFailure) { EXPECT_FATAL_FAILURE(AddFatalFailure(), "Expected fatal failure."); }