nswrap/ast/visibility_attr_test.go

35 lines
837 B
Go
Raw Normal View History

2019-04-09 11:52:21 -04:00
package ast
import (
"testing"
)
func TestVisibilityAttr(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x55c49d8dd1d8 <col:16, col:36> Default`: testNode{&VisibilityAttr{
2019-04-09 11:52:21 -04:00
Addr: 0x55c49d8dd1d8,
Pos: NewPositionFromString("col:16, col:36"),
ChildNodes: []Node{},
IsInherited: false,
IsDefault: true,
},
0x55c49d8dd1d8,
NewPositionFromString("col:16, col:36"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
`0x7f8e7b00bb80 </cmark/src/cmark.h:497:16, col:36> Inherited Default`: testNode{&VisibilityAttr{
2019-04-09 11:52:21 -04:00
Addr: 0x7f8e7b00bb80,
Pos: NewPositionFromString("/cmark/src/cmark.h:497:16, col:36"),
ChildNodes: []Node{},
IsInherited: true,
IsDefault: true,
},
0x7f8e7b00bb80,
NewPositionFromString("/cmark/src/cmark.h:497:16, col:36"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-04-09 11:52:21 -04:00
}
runNodeTests(t, nodes)
}