[llvm] 6f779f3 - [DWARFYAML][unittest] Use parseDWARFYAML() in unit test. NFC.
Xing GUO via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 3 07:31:48 PDT 2020
Author: Xing GUO
Date: 2020-07-03T22:36:00+08:00
New Revision: 6f779f35f572e17994bd334681131d9066b65f21
URL: https://github.com/llvm/llvm-project/commit/6f779f35f572e17994bd334681131d9066b65f21
DIFF: https://github.com/llvm/llvm-project/commit/6f779f35f572e17994bd334681131d9066b65f21.diff
LOG: [DWARFYAML][unittest] Use parseDWARFYAML() in unit test. NFC.
Added:
Modified:
llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp b/llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp
index 138c0999c1cc..e93773999ad3 100644
--- a/llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp
+++ b/llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp
@@ -45,8 +45,8 @@ TEST(DebugAddrSection, TestParseDebugAddrYAML) {
Length: 0x1234
Version: 5
)";
- auto SectionsOrErr = DWARFYAML::emitDebugSections(Yaml);
- EXPECT_THAT_EXPECTED(SectionsOrErr, Succeeded());
+ auto DWARFOrErr = parseDWARFYAML(Yaml);
+ EXPECT_THAT_EXPECTED(DWARFOrErr, Succeeded());
}
TEST(DebugAddrSection, TestMissingVersion) {
@@ -55,8 +55,8 @@ TEST(DebugAddrSection, TestMissingVersion) {
- Format: DWARF64
Length: 0x1234
)";
- auto SectionsOrErr = DWARFYAML::emitDebugSections(Yaml);
- EXPECT_THAT_ERROR(SectionsOrErr.takeError(),
+ auto DWARFOrErr = parseDWARFYAML(Yaml);
+ EXPECT_THAT_ERROR(DWARFOrErr.takeError(),
FailedWithMessage("missing required key 'Version'"));
}
@@ -68,8 +68,8 @@ TEST(DebugAddrSection, TestUnexpectedKey) {
Version: 5
Blah: unexpected
)";
- auto SectionsOrErr = DWARFYAML::emitDebugSections(Yaml);
- EXPECT_THAT_ERROR(SectionsOrErr.takeError(),
+ auto DWARFOrErr = parseDWARFYAML(Yaml);
+ EXPECT_THAT_ERROR(DWARFOrErr.takeError(),
FailedWithMessage("unknown key 'Blah'"));
}
More information about the llvm-commits
mailing list