Page MenuHomePhabricator

[yaml2obj] - Refactor header-sh-fields.yaml test.
ClosedPublic

Authored by grimar on Jul 9 2020, 6:14 AM.

Details

Summary

This refines the test to use macros. It is needed for
a follow-up change that adds a functionality to
override more fields.

Also, it is just cleaner to test each key separately.

Diff Detail

Event Timeline

grimar created this revision.Jul 9 2020, 6:14 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: emaste. · View Herald Transcript
jhenderson added inline comments.Jul 13 2020, 12:25 AM
llvm/test/tools/yaml2obj/ELF/header-sh-fields.yaml
6–25

This case isn't really checking the default values any more. It's checking that the default variable values as specified in the YAML are followed, but the purpose of the check seems to me to be to show what happens when the fields aren't specified.

grimar updated this revision to Diff 277371.Jul 13 2020, 3:18 AM
grimar marked an inline comment as done.
  • Addressed review comment.
llvm/test/tools/yaml2obj/ELF/header-sh-fields.yaml
6–25

Fixed.

jhenderson accepted this revision.Jul 13 2020, 6:02 AM

LGTM, with nit.

llvm/test/tools/yaml2obj/ELF/header-sh-fields.yaml
22

and this -> and that this

This revision is now accepted and ready to land.Jul 13 2020, 6:02 AM
This revision was automatically updated to reflect the committed changes.