nswrap/ast/warn_unused_result_attr_test.go

31 lines
648 B
Go
Raw Normal View History

2019-04-09 11:52:21 -04:00
package ast
import (
"testing"
)
func TestWarnUnusedResultAttr(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x7fa1d704d420 <col:60> warn_unused_result`: testNode{&WarnUnusedResultAttr{
2019-04-09 11:52:21 -04:00
Addr: 0x7fa1d704d420,
Pos: NewPositionFromString("col:60"),
ChildNodes: []Node{},
},
0x7fa1d704d420,
NewPositionFromString("col:60"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
`0x1fac810 <line:481:52>`: testNode{&WarnUnusedResultAttr{
2019-04-09 11:52:21 -04:00
Addr: 0x1fac810,
Pos: NewPositionFromString("line:481:52"),
ChildNodes: []Node{},
},
0x1fac810,
NewPositionFromString("line:481:52"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-04-09 11:52:21 -04:00
}
runNodeTests(t, nodes)
}