aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/DwarfTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/DwarfTest.cpp')
-rw-r--r--llvm/unittests/Support/DwarfTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/unittests/Support/DwarfTest.cpp b/llvm/unittests/Support/DwarfTest.cpp
index 2dccfe7..b1a23b3 100644
--- a/llvm/unittests/Support/DwarfTest.cpp
+++ b/llvm/unittests/Support/DwarfTest.cpp
@@ -69,4 +69,14 @@ TEST(DwarfTest, getLanguage) {
EXPECT_EQ(0u, getLanguage("DW_LANG_hi_user"));
}
+TEST(DwarfTest, AttributeEncodingStringOnInvalid) {
+ // This is invalid, so it shouldn't be stringified.
+ EXPECT_EQ(nullptr, AttributeEncodingString(0));
+
+ // These aren't really tags: they describe ranges within tags. They
+ // shouldn't be stringified either.
+ EXPECT_EQ(nullptr, AttributeEncodingString(DW_ATE_lo_user));
+ EXPECT_EQ(nullptr, AttributeEncodingString(DW_ATE_hi_user));
+}
+
} // end namespace