nswrap/ast/call_expr_test.go

33 lines
703 B
Go
Raw Normal View History

2019-04-09 11:52:21 -04:00
package ast
import (
"testing"
)
func TestCallExpr(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x7f9bf3033240 <col:11, col:25> 'int'`: testNode{&CallExpr{
2019-04-09 11:52:21 -04:00
Addr: 0x7f9bf3033240,
Pos: NewPositionFromString("col:11, col:25"),
Type: "int",
ChildNodes: []Node{},
},
0x7f9bf3033240,
NewPositionFromString("col:11, col:25"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
`0x7f9bf3035c20 <line:7:4, col:64> 'int'`: testNode{&CallExpr{
2019-04-09 11:52:21 -04:00
Addr: 0x7f9bf3035c20,
Pos: NewPositionFromString("line:7:4, col:64"),
Type: "int",
ChildNodes: []Node{},
},
0x7f9bf3035c20,
NewPositionFromString("line:7:4, col:64"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-04-09 11:52:21 -04:00
}
runNodeTests(t, nodes)
}