mirror of
https://github.com/google/googletest.git
synced 2026-04-30 19:09:20 +08:00
Fix typos
This commit is contained in:
parent
d72f9c8aea
commit
0cea3c8e07
@ -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:-}"
|
||||
|
||||
@ -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<char> element_matched(matrix.LhsSize(), 0);
|
||||
::std::vector<char> matcher_matched(matrix.RhsSize(), 0);
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<int> 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<int> s(std::begin(a), std::end(a));
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -1187,7 +1187,7 @@ void UniversalTersePrint(const T& value, ::std::ostream* os) {
|
||||
// NUL-terminated string.
|
||||
template <typename T>
|
||||
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<T1>::Print(value, os);
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -948,7 +948,7 @@ TEST_F(PREFIX_WITH_MACRO(NamingTestNonParametrized),
|
||||
EXPECT_STREQ("FooSomeTestName", test_info->name());
|
||||
}
|
||||
|
||||
TEST(MacroNameing, LookupNames) {
|
||||
TEST(MacroNaming, LookupNames) {
|
||||
std::set<std::string> know_suite_names, know_test_names;
|
||||
|
||||
const auto& ins = testing::UnitTest::GetInstance();
|
||||
|
||||
@ -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<NoDefaultConstructor> bar(NoDefaultConstructor("foo"));
|
||||
bar.pointer();
|
||||
}
|
||||
|
||||
@ -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.");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user