Remove the Triple tests that stressing the TargetParser's behaviour.

Now the tests of TargetParser is in place:
unittests/Support/TargetParserTest.cpp.
So the tests in TripleTest.cpp which actually stressing TargetParser's behavior could be removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278899 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Zijiao Ma 2016-08-17 03:17:07 +00:00
parent b699f7b88f
commit 8db1b32c33

View File

@ -888,112 +888,6 @@ TEST(TripleTest, NormalizeWindows) {
}
TEST(TripleTest, getARMCPUForArch) {
// Standard ARM Architectures.
{
llvm::Triple Triple("armv4-unknown-eabi");
EXPECT_EQ("strongarm", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv4t-unknown-eabi");
EXPECT_EQ("arm7tdmi", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv5-unknown-eabi");
EXPECT_EQ("arm10tdmi", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv5t-unknown-eabi");
EXPECT_EQ("arm10tdmi", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv5e-unknown-eabi");
EXPECT_EQ("arm1022e", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv5tej-unknown-eabi");
EXPECT_EQ("arm926ej-s", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6-unknown-eabi");
EXPECT_EQ("arm1136jf-s", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6j-unknown-eabi");
EXPECT_EQ("arm1136jf-s", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6k-unknown-eabi");
EXPECT_EQ("arm1176j-s", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6kz-unknown-eabi");
EXPECT_EQ("arm1176jzf-s", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6zk-unknown-eabi");
EXPECT_EQ("arm1176jzf-s", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6t2-unknown-eabi");
EXPECT_EQ("arm1156t2-s", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6m-unknown-eabi");
EXPECT_EQ("cortex-m0", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7-unknown-eabi");
EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7a-unknown-eabi");
EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7m-unknown-eabi");
EXPECT_EQ("cortex-m3", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7r-unknown-eabi");
EXPECT_EQ("cortex-r4", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7r-unknown-eabi");
EXPECT_EQ("cortex-r4", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7r-unknown-eabi");
EXPECT_EQ("cortex-r4", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7r-unknown-eabi");
EXPECT_EQ("cortex-r4", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv8a-unknown-eabi");
EXPECT_EQ("cortex-a53", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv8.1a-unknown-eabi");
EXPECT_EQ("generic", Triple.getARMCPUForArch());
}
// Non-synonym names, using -march style, not default arch.
{
llvm::Triple Triple("arm");
EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch("armv7-a"));
}
{
llvm::Triple Triple("arm");
EXPECT_EQ("cortex-m3", Triple.getARMCPUForArch("armv7-m"));
}
{
llvm::Triple Triple("arm");
EXPECT_EQ("cortex-a53", Triple.getARMCPUForArch("armv8"));
}
{
llvm::Triple Triple("arm");
EXPECT_EQ("cortex-a53", Triple.getARMCPUForArch("armv8-a"));
}
// Platform specific defaults.
{
llvm::Triple Triple("arm--nacl");
@ -1016,18 +910,6 @@ TEST(TripleTest, getARMCPUForArch) {
EXPECT_EQ("cortex-a9", Triple.getARMCPUForArch());
}
// Some alternative architectures
{
llvm::Triple Triple("xscale-unknown-eabi");
EXPECT_EQ("xscale", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("iwmmxt-unknown-eabi");
EXPECT_EQ("iwmmxt", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7s-apple-ios7");
EXPECT_EQ("swift", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7k-apple-ios9");
EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch());
@ -1040,18 +922,6 @@ TEST(TripleTest, getARMCPUForArch) {
llvm::Triple Triple("armv7k-apple-tvos9");
EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7em-apple-ios7");
EXPECT_EQ("cortex-m4", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7l-linux-gnueabihf");
EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6sm-apple-ios7");
EXPECT_EQ("cortex-m0", Triple.getARMCPUForArch());
}
// armeb is permitted, but armebeb is not
{
llvm::Triple Triple("armeb-none-eabi");
@ -1065,15 +935,6 @@ TEST(TripleTest, getARMCPUForArch) {
llvm::Triple Triple("armebv6eb-none-eabi");
EXPECT_EQ("", Triple.getARMCPUForArch());
}
// armebv6 and armv6eb are permitted, but armebv6eb is not
{
llvm::Triple Triple("armebv6-non-eabi");
EXPECT_EQ("arm1136jf-s", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6eb-none-eabi");
EXPECT_EQ("arm1136jf-s", Triple.getARMCPUForArch());
}
// xscaleeb is permitted, but armebxscale is not
{
llvm::Triple Triple("xscaleeb-none-eabi");
@ -1108,63 +969,19 @@ TEST(TripleTest, ParseARMArch) {
Triple T = Triple("arm");
EXPECT_EQ(Triple::arm, T.getArch());
}
{
Triple T = Triple("armv6t2");
EXPECT_EQ(Triple::arm, T.getArch());
}
{
Triple T = Triple("armv8");
EXPECT_EQ(Triple::arm, T.getArch());
}
{
Triple T = Triple("armeb");
EXPECT_EQ(Triple::armeb, T.getArch());
}
{
Triple T = Triple("armv5eb");
EXPECT_EQ(Triple::armeb, T.getArch());
}
{
Triple T = Triple("armebv7m");
EXPECT_EQ(Triple::armeb, T.getArch());
}
{
Triple T = Triple("armv7eb");
EXPECT_EQ(Triple::armeb, T.getArch());
}
// THUMB
{
Triple T = Triple("thumb");
EXPECT_EQ(Triple::thumb, T.getArch());
}
{
Triple T = Triple("thumbv7a");
EXPECT_EQ(Triple::thumb, T.getArch());
}
{
Triple T = Triple("thumbeb");
EXPECT_EQ(Triple::thumbeb, T.getArch());
}
{
Triple T = Triple("thumbv4teb");
EXPECT_EQ(Triple::thumbeb, T.getArch());
}
{
Triple T = Triple("thumbebv7");
EXPECT_EQ(Triple::thumbeb, T.getArch());
}
{
Triple T = Triple("armv6m");
EXPECT_EQ(Triple::thumb, T.getArch());
}
{
Triple T = Triple("thumbv2");
EXPECT_EQ(Triple::UnknownArch, T.getArch());
}
{
Triple T = Triple("thumbebv6eb");
EXPECT_EQ(Triple::UnknownArch, T.getArch());
}
// AARCH64
{
Triple T = Triple("arm64");
@ -1178,13 +995,5 @@ TEST(TripleTest, ParseARMArch) {
Triple T = Triple("aarch64_be");
EXPECT_EQ(Triple::aarch64_be, T.getArch());
}
{
Triple T = Triple("aarch64be");
EXPECT_EQ(Triple::UnknownArch, T.getArch());
}
{
Triple T = Triple("arm64be");
EXPECT_EQ(Triple::UnknownArch, T.getArch());
}
}
} // end anonymous namespace