aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/ADT/TripleTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ADT/TripleTest.cpp')
-rw-r--r--unittests/ADT/TripleTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/unittests/ADT/TripleTest.cpp b/unittests/ADT/TripleTest.cpp
index 1f9aa32..1113bb6 100644
--- a/unittests/ADT/TripleTest.cpp
+++ b/unittests/ADT/TripleTest.cpp
@@ -159,6 +159,12 @@ TEST(TripleTest, ParsedIDs) {
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
EXPECT_EQ(Triple::UnknownOS, T.getOS());
+ T = Triple("x86_64-unknown-cloudabi");
+ EXPECT_EQ(Triple::x86_64, T.getArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::CloudABI, T.getOS());
+ EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
+
T = Triple("huh");
EXPECT_EQ(Triple::UnknownArch, T.getArch());
}
@@ -663,6 +669,10 @@ TEST(TripleTest, getARMCPUForArch) {
EXPECT_STREQ("cortex-a8", Triple.getARMCPUForArch());
EXPECT_STREQ("swift", Triple.getARMCPUForArch("armv7s"));
}
+ {
+ llvm::Triple Triple("arm--nacl");
+ EXPECT_STREQ("cortex-a8", Triple.getARMCPUForArch("arm"));
+ }
}
}