nswrap/ast/predefined_expr_test.go

25 lines
497 B
Go
Raw Normal View History

2019-04-09 11:52:21 -04:00
package ast
import (
"testing"
)
func TestPredefinedExpr(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x33d6e08 <col:30> 'const char [25]' lvalue __PRETTY_FUNCTION__`: testNode{&PredefinedExpr{
2019-04-09 11:52:21 -04:00
Addr: 0x33d6e08,
Pos: NewPositionFromString("col:30"),
Type: "const char [25]",
Lvalue: true,
Name: "__PRETTY_FUNCTION__",
ChildNodes: []Node{},
},
0x33d6e08,
NewPositionFromString("col:30"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-04-09 11:52:21 -04:00
}
runNodeTests(t, nodes)
}