mirror of
https://github.com/google/googletest.git
synced 2025-12-06 08:46:50 +08:00
Automated Code Change
PiperOrigin-RevId: 813050069 Change-Id: I7c778db5bda5d681097af5d3569b5f4b980603e4
This commit is contained in:
parent
50b8600c63
commit
9706f75b8f
@ -696,7 +696,7 @@ class TestGenerationEnvironment : public ::testing::Environment {
|
||||
msg << "TestsExpandedAndRun/" << i;
|
||||
if (UnitTestOptions::FilterMatchesTest(
|
||||
"TestExpansionModule/MultipleTestGenerationTest",
|
||||
msg.GetString().c_str())) {
|
||||
msg.GetString())) {
|
||||
perform_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1699,7 +1699,7 @@ TEST(PrintToStringTest, ContainsNonLatin) {
|
||||
EXPECT_PRINT_TO_STRING_(non_ascii_str,
|
||||
"\"\\xEC\\x98\\xA4\\xEC\\xA0\\x84 4:30\"\n"
|
||||
" As Text: \"오전 4:30\"");
|
||||
non_ascii_str = ::std::string("From ä — ẑ");
|
||||
non_ascii_str = "From ä — ẑ";
|
||||
EXPECT_PRINT_TO_STRING_(non_ascii_str,
|
||||
"\"From \\xC3\\xA4 \\xE2\\x80\\x94 \\xE1\\xBA\\x91\""
|
||||
"\n As Text: \"From ä — ẑ\"");
|
||||
|
||||
@ -95,9 +95,9 @@ void ManyAsserts(int id) {
|
||||
|
||||
// RecordProperty() should interact safely with other threads as well.
|
||||
// The shared_key forces property updates.
|
||||
Test::RecordProperty(IdToKey(id, "string").c_str(), IdToString(id).c_str());
|
||||
Test::RecordProperty(IdToKey(id, "string"), IdToString(id));
|
||||
Test::RecordProperty(IdToKey(id, "int").c_str(), id);
|
||||
Test::RecordProperty("shared_key", IdToString(id).c_str());
|
||||
Test::RecordProperty("shared_key", IdToString(id));
|
||||
|
||||
// This assertion should fail kThreadCount times per thread. It
|
||||
// is for testing whether Google Test can handle failed assertions in a
|
||||
|
||||
@ -2649,8 +2649,8 @@ TEST(IsSubstringTest, GeneratesCorrectMessageForCString) {
|
||||
// Tests that IsSubstring returns the correct result when the input
|
||||
// argument type is ::std::string.
|
||||
TEST(IsSubstringTest, ReturnsCorrectResultsForStdString) {
|
||||
EXPECT_TRUE(IsSubstring("", "", std::string("hello"), "ahellob"));
|
||||
EXPECT_FALSE(IsSubstring("", "", "hello", std::string("world")));
|
||||
EXPECT_TRUE(IsSubstring("", "", "hello", "ahellob"));
|
||||
EXPECT_FALSE(IsSubstring("", "", "hello", "world"));
|
||||
}
|
||||
|
||||
#if GTEST_HAS_STD_WSTRING
|
||||
@ -2707,8 +2707,8 @@ TEST(IsNotSubstringTest, GeneratesCorrectMessageForWideCString) {
|
||||
// Tests that IsNotSubstring returns the correct result when the input
|
||||
// argument type is ::std::string.
|
||||
TEST(IsNotSubstringTest, ReturnsCorrectResultsForStdString) {
|
||||
EXPECT_FALSE(IsNotSubstring("", "", std::string("hello"), "ahellob"));
|
||||
EXPECT_TRUE(IsNotSubstring("", "", "hello", std::string("world")));
|
||||
EXPECT_FALSE(IsNotSubstring("", "", "hello", "ahellob"));
|
||||
EXPECT_TRUE(IsNotSubstring("", "", "hello", "world"));
|
||||
}
|
||||
|
||||
// Tests that IsNotSubstring() generates the correct message when the input
|
||||
@ -2719,8 +2719,7 @@ TEST(IsNotSubstringTest, GeneratesCorrectMessageForStdString) {
|
||||
" Actual: \"needle\"\n"
|
||||
"Expected: not a substring of haystack_expr\n"
|
||||
"Which is: \"two needles\"",
|
||||
IsNotSubstring("needle_expr", "haystack_expr", ::std::string("needle"),
|
||||
"two needles")
|
||||
IsNotSubstring("needle_expr", "haystack_expr", "needle", "two needles")
|
||||
.failure_message());
|
||||
}
|
||||
|
||||
@ -3655,8 +3654,7 @@ TEST(AssertionTest, EqFailure) {
|
||||
msg4.c_str());
|
||||
|
||||
const std::string msg5(
|
||||
EqFailure("foo", "bar", std::string("\"x\""), std::string("\"y\""), true)
|
||||
.failure_message());
|
||||
EqFailure("foo", "bar", "\"x\"", "\"y\"", true).failure_message());
|
||||
EXPECT_STREQ(
|
||||
"Expected equality of these values:\n"
|
||||
" foo\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user