summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/TripleTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT/TripleTest.cpp')
-rw-r--r--llvm/unittests/ADT/TripleTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/TripleTest.cpp b/llvm/unittests/ADT/TripleTest.cpp
index b78aee4f33d..ed4a88067b1 100644
--- a/llvm/unittests/ADT/TripleTest.cpp
+++ b/llvm/unittests/ADT/TripleTest.cpp
@@ -1000,6 +1000,15 @@ TEST(TripleTest, getOSVersion) {
EXPECT_EQ((unsigned)7, Major);
EXPECT_EQ((unsigned)0, Minor);
EXPECT_EQ((unsigned)0, Micro);
+ EXPECT_FALSE(T.isSimulatorEnvironment());
+
+ T = Triple("x86_64-apple-ios10.3-simulator");
+ EXPECT_TRUE(T.isiOS());
+ T.getiOSVersion(Major, Minor, Micro);
+ EXPECT_EQ((unsigned)10, Major);
+ EXPECT_EQ((unsigned)3, Minor);
+ EXPECT_EQ((unsigned)0, Micro);
+ EXPECT_TRUE(T.isSimulatorEnvironment());
}
TEST(TripleTest, FileFormat) {
OpenPOWER on IntegriCloud