nswrap/ast/returns_twice_attr_test.go

35 lines
727 B
Go
Raw Permalink Normal View History

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