Fix platform:abi_test on windows.

PiperOrigin-RevId: 290681008
Change-Id: I6e058ebb1d6e38e2ee02c2e0556db00cdc965315
This commit is contained in:
Gunhan Gulsoy 2020-01-20 21:59:12 -08:00 committed by TensorFlower Gardener
parent b9f39b7fad
commit e930e68bc8

View File

@ -25,12 +25,17 @@ struct MyRandomPODType {};
TEST(AbiTest, AbiDemangleTest) {
EXPECT_EQ(port::MaybeAbiDemangle(MakeTypeIndex<int>().name()), "int");
#ifdef PLATFORM_WINDOWS
const char pod_type_name[] = "struct tensorflow::MyRandomPODType";
#else
const char pod_type_name[] = "tensorflow::MyRandomPODType";
#endif
EXPECT_EQ(port::MaybeAbiDemangle(MakeTypeIndex<MyRandomPODType>().name()),
"tensorflow::MyRandomPODType");
pod_type_name);
EXPECT_EQ(
port::MaybeAbiDemangle("help! i'm caught in a C++ mangle factoryasdf"),
"help! i'm caught in a C++ mangle factoryasdf");
port::MaybeAbiDemangle("help! i'm caught in a C++ mangle factoryasdf"),
"help! i'm caught in a C++ mangle factoryasdf");
}
} // namespace tensorflow