mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Support: Fix tests for VirtualityString
Since these `dwarf` functions return `const char *`, the tests need to use `StringRef` for checks. Should fix, e.g., hexagon [1]. [1]: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/22435 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228478 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a504d487c
commit
f28bf6c7aa
@ -96,13 +96,16 @@ TEST(DwarfTest, getAttributeEncoding) {
|
||||
}
|
||||
|
||||
TEST(DwarfTest, VirtualityString) {
|
||||
EXPECT_EQ("DW_VIRTUALITY_none", VirtualityString(DW_VIRTUALITY_none));
|
||||
EXPECT_EQ("DW_VIRTUALITY_virtual", VirtualityString(DW_VIRTUALITY_virtual));
|
||||
EXPECT_EQ("DW_VIRTUALITY_pure_virtual",
|
||||
EXPECT_EQ(StringRef("DW_VIRTUALITY_none"),
|
||||
VirtualityString(DW_VIRTUALITY_none));
|
||||
EXPECT_EQ(StringRef("DW_VIRTUALITY_virtual"),
|
||||
VirtualityString(DW_VIRTUALITY_virtual));
|
||||
EXPECT_EQ(StringRef("DW_VIRTUALITY_pure_virtual"),
|
||||
VirtualityString(DW_VIRTUALITY_pure_virtual));
|
||||
|
||||
// DW_VIRTUALITY_max should be pure virtual.
|
||||
EXPECT_EQ("DW_VIRTUALITY_pure_virtual", VirtualityString(DW_VIRTUALITY_max));
|
||||
EXPECT_EQ(StringRef("DW_VIRTUALITY_pure_virtual"),
|
||||
VirtualityString(DW_VIRTUALITY_max));
|
||||
|
||||
// Invalid numbers shouldn't be stringified.
|
||||
EXPECT_EQ(nullptr, VirtualityString(DW_VIRTUALITY_max + 1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user