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) {
- 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'"));
}
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'"));
}