diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-18 19:26:55 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-18 19:26:55 +0000 |
commit | 651aa689cc37d5932fac0e096aa8b536f282aa21 (patch) | |
tree | ecd1967cfa05a67497cf0275abcb468ab04108c0 /unittests/ADT/TripleTest.cpp | |
parent | fe37ab335be5632eab561d49984c95cb06b946d4 (diff) |
Improve Triple to recognize the OS in i386-mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ADT/TripleTest.cpp')
-rw-r--r-- | unittests/ADT/TripleTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/unittests/ADT/TripleTest.cpp b/unittests/ADT/TripleTest.cpp index cbb2ea48f1..1a9e81a0df 100644 --- a/unittests/ADT/TripleTest.cpp +++ b/unittests/ADT/TripleTest.cpp @@ -92,6 +92,18 @@ TEST(TripleTest, ParsedIDs) { T = Triple("huh"); EXPECT_EQ(Triple::UnknownArch, T.getArch()); + + // Two exceptional cases. + + T = Triple("i386-mingw32"); + EXPECT_EQ(Triple::x86, T.getArch()); + EXPECT_EQ(Triple::PC, T.getVendor()); + EXPECT_EQ(Triple::MinGW32, T.getOS()); + + T = Triple("arm-elf"); + EXPECT_EQ(Triple::arm, T.getArch()); + EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); + EXPECT_EQ(Triple::UnknownOS, T.getOS()); } TEST(TripleTest, MutateName) { |