[Decompiler] Test framework for decompiler regression tests and gcommon tests (#200)

* test framework for pre-expression compact stuff

* check ordering

* more tests

* final tests gcommon
This commit is contained in:
water111
2021-01-18 13:33:32 -05:00
committed by GitHub
parent e8ad91a454
commit 40d328f4eb
13 changed files with 1116 additions and 16 deletions
@@ -1065,4 +1065,13 @@ std::string LinkedObjectFile::get_goal_string_by_label(const DecompilerLabel& la
assert(0 == (label.offset % 4));
return get_goal_string(label.target_segment, (label.offset / 4) - 1, false);
}
const DecompilerLabel& LinkedObjectFile::get_label_by_name(const std::string& name) const {
for (auto& label : labels) {
if (label.name == name) {
return label;
}
}
throw std::runtime_error("Can't find label " + name);
}
} // namespace decompiler