mirror of
https://github.com/google/googletest.git
synced 2024-12-30 21:23:01 +08:00
Add unit test for CanonicalizeForStdLibVersioning.
This commit is contained in:
parent
045e7f9ee4
commit
b8fa4d2754
@ -380,6 +380,31 @@ TEST(GetTestTypeIdTest, ReturnsTheSameValueInsideOrOutsideOfGoogleTest) {
|
||||
EXPECT_EQ(kTestTypeIdInGoogleTest, GetTestTypeId());
|
||||
}
|
||||
|
||||
// Tests CanonicalizeForStdLibVersioning.
|
||||
|
||||
using ::testing::internal::CanonicalizeForStdLibVersioning;
|
||||
|
||||
TEST(CanonicalizeForStdLibVersioning, LeavesUnversionedNamesUnchanged) {
|
||||
EXPECT_EQ("std::bind", CanonicalizeForStdLibVersioning("std::bind"));
|
||||
EXPECT_EQ("std::_", CanonicalizeForStdLibVersioning("std::_"));
|
||||
EXPECT_EQ("std::__foo", CanonicalizeForStdLibVersioning("std::__foo"));
|
||||
EXPECT_EQ("gtl::__1::x", CanonicalizeForStdLibVersioning("gtl::__1::x"));
|
||||
EXPECT_EQ("__1::x", CanonicalizeForStdLibVersioning("__1::x"));
|
||||
EXPECT_EQ("::__1::x", CanonicalizeForStdLibVersioning("::__1::x"));
|
||||
}
|
||||
|
||||
TEST(CanonicalizeForStdLibVersioning, ElidesDoubleUnderNames) {
|
||||
EXPECT_EQ("std::bind", CanonicalizeForStdLibVersioning("std::__1::bind"));
|
||||
EXPECT_EQ("std::_", CanonicalizeForStdLibVersioning("std::__1::_"));
|
||||
|
||||
EXPECT_EQ("std::bind", CanonicalizeForStdLibVersioning("std::__g::bind"));
|
||||
EXPECT_EQ("std::_", CanonicalizeForStdLibVersioning("std::__g::_"));
|
||||
|
||||
EXPECT_EQ("std::bind",
|
||||
CanonicalizeForStdLibVersioning("std::__google::bind"));
|
||||
EXPECT_EQ("std::_", CanonicalizeForStdLibVersioning("std::__google::_"));
|
||||
}
|
||||
|
||||
// Tests FormatTimeInMillisAsSeconds().
|
||||
|
||||
TEST(FormatTimeInMillisAsSecondsTest, FormatsZero) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user