tests: autogenerated test to confirm attribute strings

Test helps verify our attribute types match the macros in textflag.h.
Discovered https://golang.org/issue/29487 in the process.

Updates #2
This commit is contained in:
Michael McLoughlin
2018-12-31 17:30:03 -08:00
parent 6d6ff3cfc1
commit f2315d539c
5 changed files with 1657 additions and 11 deletions

20
attr.go
View File

@@ -83,14 +83,14 @@ func (a Attribute) split() ([]string, Attribute) {
}
var attrname = map[Attribute]string{
NOPROF: "NOPROF",
DUPOK: "DUPOK",
NOSPLIT: "NOSPLIT",
RODATA: "RODATA",
NOPTR: "NOPTR",
WRAPPER: "WRAPPER",
NEEDCTXT: "NEEDCTXT",
TLSBSS: "TLSBSS",
NOFRAME: "NOFRAME",
REFLECTMETHOD: "REFLECTMETHOD",
NOPROF: "NOPROF",
DUPOK: "DUPOK",
NOSPLIT: "NOSPLIT",
RODATA: "RODATA",
NOPTR: "NOPTR",
WRAPPER: "WRAPPER",
NEEDCTXT: "NEEDCTXT",
TLSBSS: "TLSBSS",
NOFRAME: "NOFRAME",
// REFLECTMETHOD excluded due to https://golang.org/issue/29487
}