nswrap/ast/restrict_attr_test.go

23 lines
438 B
Go
Raw Normal View History

2019-04-09 11:52:21 -04:00
package ast
import (
"testing"
)
func TestRestrictAttr(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x7f980b858305 <line:11:7, line:18:7> foo`: testNode{&RestrictAttr{
2019-04-09 11:52:21 -04:00
Addr: 0x7f980b858305,
Pos: NewPositionFromString("line:11:7, line:18:7"),
Name: "foo",
ChildNodes: []Node{},
},
0x7f980b858305,
NewPositionFromString("line:11:7, line:18:7"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-04-09 11:52:21 -04:00
}
runNodeTests(t, nodes)
}