From 6f779f35f572e17994bd334681131d9066b65f21 Mon Sep 17 00:00:00 2001 From: Xing GUO Date: Fri, 3 Jul 2020 22:34:27 +0800 Subject: [PATCH] [DWARFYAML][unittest] Use parseDWARFYAML() in unit test. NFC. --- llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 @@ debug_addr: 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 @@ debug_addr: - 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 @@ debug_addr: 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'")); }