nswrap/ast/asm_label_attr_test.go

35 lines
884 B
Go
Raw Normal View History

2019-04-09 11:52:21 -04:00
package ast
import (
"testing"
)
func TestAsmLabelAttr(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x7ff26d8224e8 </usr/include/sys/cdefs.h:569:36> "_fopen"`: testNode{&AsmLabelAttr{
2019-04-09 11:52:21 -04:00
Addr: 0x7ff26d8224e8,
Pos: NewPositionFromString("/usr/include/sys/cdefs.h:569:36"),
Inherited: false,
FunctionName: "_fopen",
ChildNodes: []Node{},
},
0x7ff26d8224e8,
NewPositionFromString("/usr/include/sys/cdefs.h:569:36"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
`0x7fd55a169318 </usr/include/stdio.h:325:47> Inherited "_popen"`: testNode{&AsmLabelAttr{
2019-04-09 11:52:21 -04:00
Addr: 0x7fd55a169318,
Pos: NewPositionFromString("/usr/include/stdio.h:325:47"),
Inherited: true,
FunctionName: "_popen",
ChildNodes: []Node{},
},
0x7fd55a169318,
NewPositionFromString("/usr/include/stdio.h:325:47"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-04-09 11:52:21 -04:00
}
runNodeTests(t, nodes)
}