nswrap/ast/pure_attr_test.go

35 lines
700 B
Go
Raw Normal View History

2019-04-09 11:52:21 -04:00
package ast
import (
"testing"
)
func TestPureAttr(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x7fe9eb899198 <col:1> Implicit`: testNode{&PureAttr{
2019-04-09 11:52:21 -04:00
Addr: 0x7fe9eb899198,
Pos: NewPositionFromString("col:1"),
Implicit: true,
Inherited: false,
ChildNodes: []Node{},
},
0x7fe9eb899198,
NewPositionFromString("col:1"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
`0x7fe8d60992a0 <col:1> Inherited Implicit`: testNode{&PureAttr{
2019-04-09 11:52:21 -04:00
Addr: 0x7fe8d60992a0,
Pos: NewPositionFromString("col:1"),
Implicit: true,
Inherited: true,
ChildNodes: []Node{},
},
0x7fe8d60992a0,
NewPositionFromString("col:1"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-04-09 11:52:21 -04:00
}
runNodeTests(t, nodes)
}