diff options
Diffstat (limited to 'lldb/unittests/Utility/ArchSpecTest.cpp')
| -rw-r--r-- | lldb/unittests/Utility/ArchSpecTest.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/unittests/Utility/ArchSpecTest.cpp b/lldb/unittests/Utility/ArchSpecTest.cpp index 318626d9fea..0186ff05ead 100644 --- a/lldb/unittests/Utility/ArchSpecTest.cpp +++ b/lldb/unittests/Utility/ArchSpecTest.cpp @@ -157,8 +157,13 @@ TEST(ArchSpecTest, MergeFrom) { ArchSpec A("aarch64"); ArchSpec B("aarch64--linux-android"); + ArchSpec C("arm64_32"); + ArchSpec D("arm64_32--watchos"); + EXPECT_TRUE(A.IsValid()); EXPECT_TRUE(B.IsValid()); + EXPECT_TRUE(C.IsValid()); + EXPECT_TRUE(D.IsValid()); EXPECT_EQ(llvm::Triple::ArchType::aarch64, B.GetTriple().getArch()); EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor, @@ -174,6 +179,17 @@ TEST(ArchSpecTest, MergeFrom) { EXPECT_EQ(llvm::Triple::OSType::Linux, A.GetTriple().getOS()); EXPECT_EQ(llvm::Triple::EnvironmentType::Android, A.GetTriple().getEnvironment()); + + EXPECT_EQ(llvm::Triple::ArchType::aarch64_32, D.GetTriple().getArch()); + EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor, + D.GetTriple().getVendor()); + EXPECT_EQ(llvm::Triple::OSType::WatchOS, D.GetTriple().getOS()); + + C.MergeFrom(D); + EXPECT_EQ(llvm::Triple::ArchType::aarch64_32, C.GetTriple().getArch()); + EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor, + C.GetTriple().getVendor()); + EXPECT_EQ(llvm::Triple::OSType::WatchOS, C.GetTriple().getOS()); } { ArchSpec A, B; |

