diff options
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ADT/TripleTest.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/unittests/ADT/TripleTest.cpp b/unittests/ADT/TripleTest.cpp index 35a2187..479046e 100644 --- a/unittests/ADT/TripleTest.cpp +++ b/unittests/ADT/TripleTest.cpp @@ -87,6 +87,24 @@ TEST(TripleTest, ParsedIDs) { EXPECT_EQ(Triple::Linux, T.getOS()); EXPECT_EQ(Triple::GNU, T.getEnvironment()); + T = Triple("powerpc-bgp-linux"); + EXPECT_EQ(Triple::ppc, T.getArch()); + EXPECT_EQ(Triple::BGP, T.getVendor()); + EXPECT_EQ(Triple::Linux, T.getOS()); + EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); + + T = Triple("powerpc-bgp-cnk"); + EXPECT_EQ(Triple::ppc, T.getArch()); + EXPECT_EQ(Triple::BGP, T.getVendor()); + EXPECT_EQ(Triple::CNK, T.getOS()); + EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); + + T = Triple("powerpc64-bgq-linux"); + EXPECT_EQ(Triple::ppc64, T.getArch()); + EXPECT_EQ(Triple::BGQ, T.getVendor()); + EXPECT_EQ(Triple::Linux, T.getOS()); + EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); + T = Triple("powerpc-dunno-notsure"); EXPECT_EQ(Triple::ppc, T.getArch()); EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); |