Renames some internal functions to avoid name clashes.
This commit is contained in:
@@ -79,12 +79,12 @@ class Derived : public Base {
|
||||
|
||||
TEST(ImplicitCastTest, ConvertsPointers) {
|
||||
Derived derived(0);
|
||||
EXPECT_TRUE(&derived == ::testing::internal::implicit_cast<Base*>(&derived));
|
||||
EXPECT_TRUE(&derived == ::testing::internal::ImplicitCast_<Base*>(&derived));
|
||||
}
|
||||
|
||||
TEST(ImplicitCastTest, CanUseInheritance) {
|
||||
Derived derived(1);
|
||||
Base base = ::testing::internal::implicit_cast<Base>(derived);
|
||||
Base base = ::testing::internal::ImplicitCast_<Base>(derived);
|
||||
EXPECT_EQ(derived.member(), base.member());
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class Castable {
|
||||
TEST(ImplicitCastTest, CanUseNonConstCastOperator) {
|
||||
bool converted = false;
|
||||
Castable castable(&converted);
|
||||
Base base = ::testing::internal::implicit_cast<Base>(castable);
|
||||
Base base = ::testing::internal::ImplicitCast_<Base>(castable);
|
||||
EXPECT_TRUE(converted);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ class ConstCastable {
|
||||
TEST(ImplicitCastTest, CanUseConstCastOperatorOnConstValues) {
|
||||
bool converted = false;
|
||||
const ConstCastable const_castable(&converted);
|
||||
Base base = ::testing::internal::implicit_cast<Base>(const_castable);
|
||||
Base base = ::testing::internal::ImplicitCast_<Base>(const_castable);
|
||||
EXPECT_TRUE(converted);
|
||||
}
|
||||
|
||||
@@ -148,14 +148,14 @@ TEST(ImplicitCastTest, CanSelectBetweenConstAndNonConstCasrAppropriately) {
|
||||
bool converted = false;
|
||||
bool const_converted = false;
|
||||
ConstAndNonConstCastable castable(&converted, &const_converted);
|
||||
Base base = ::testing::internal::implicit_cast<Base>(castable);
|
||||
Base base = ::testing::internal::ImplicitCast_<Base>(castable);
|
||||
EXPECT_TRUE(converted);
|
||||
EXPECT_FALSE(const_converted);
|
||||
|
||||
converted = false;
|
||||
const_converted = false;
|
||||
const ConstAndNonConstCastable const_castable(&converted, &const_converted);
|
||||
base = ::testing::internal::implicit_cast<Base>(const_castable);
|
||||
base = ::testing::internal::ImplicitCast_<Base>(const_castable);
|
||||
EXPECT_FALSE(converted);
|
||||
EXPECT_TRUE(const_converted);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class To {
|
||||
|
||||
TEST(ImplicitCastTest, CanUseImplicitConstructor) {
|
||||
bool converted = false;
|
||||
To to = ::testing::internal::implicit_cast<To>(&converted);
|
||||
To to = ::testing::internal::ImplicitCast_<To>(&converted);
|
||||
(void)to;
|
||||
EXPECT_TRUE(converted);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user