[llvm] r294095 - TripleTest.EndianArchVariants: add missing arch types (tce, le)
Alex Denisov via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 4 09:04:50 PST 2017
Author: alexdenisov
Date: Sat Feb 4 11:04:50 2017
New Revision: 294095
URL: http://llvm.org/viewvc/llvm-project?rev=294095&view=rev
Log:
TripleTest.EndianArchVariants: add missing arch types (tce, le)
Modified:
llvm/trunk/unittests/ADT/TripleTest.cpp
Modified: llvm/trunk/unittests/ADT/TripleTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/TripleTest.cpp?rev=294095&r1=294094&r2=294095&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/TripleTest.cpp (original)
+++ llvm/trunk/unittests/ADT/TripleTest.cpp Sat Feb 4 11:04:50 2017
@@ -775,6 +775,22 @@ TEST(TripleTest, EndianArchVariants) {
T.setArch(Triple::lanai);
EXPECT_EQ(Triple::lanai, T.getBigEndianArchVariant().getArch());
EXPECT_EQ(Triple::UnknownArch, T.getLittleEndianArchVariant().getArch());
+
+ T.setArch(Triple::tcele);
+ EXPECT_EQ(Triple::tce, T.getBigEndianArchVariant().getArch());
+ EXPECT_EQ(Triple::tcele, T.getLittleEndianArchVariant().getArch());
+
+ T.setArch(Triple::tce);
+ EXPECT_EQ(Triple::tce, T.getBigEndianArchVariant().getArch());
+ EXPECT_EQ(Triple::tcele, T.getLittleEndianArchVariant().getArch());
+
+ T.setArch(Triple::le32);
+ EXPECT_EQ(Triple::UnknownArch, T.getBigEndianArchVariant().getArch());
+ EXPECT_EQ(Triple::le32, T.getLittleEndianArchVariant().getArch());
+
+ T.setArch(Triple::le64);
+ EXPECT_EQ(Triple::UnknownArch, T.getBigEndianArchVariant().getArch());
+ EXPECT_EQ(Triple::le64, T.getLittleEndianArchVariant().getArch());
}
TEST(TripleTest, getOSVersion) {
More information about the llvm-commits
mailing list