nswrap/ast/enum_constant_decl_test.go

39 lines
879 B
Go
Raw Permalink Normal View History

2019-04-09 11:52:21 -04:00
package ast
import (
"testing"
)
func TestEnumConstantDecl(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x1660db0 <line:185:3> __codecvt_noconv 'int'`: testNode{&EnumConstantDecl{
2019-04-09 11:52:21 -04:00
Addr: 0x1660db0,
Pos: NewPositionFromString("line:185:3"),
Position2: "",
Referenced: false,
Name: "__codecvt_noconv",
Type: "int",
ChildNodes: []Node{},
},
0x1660db0,
NewPositionFromString("line:185:3"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
`0x3c77ba8 <line:59:3, col:65> col:3 referenced _ISalnum 'int'`: testNode{&EnumConstantDecl{
2019-04-09 11:52:21 -04:00
Addr: 0x3c77ba8,
Pos: NewPositionFromString("line:59:3, col:65"),
Position2: "col:3",
Referenced: true,
Name: "_ISalnum",
Type: "int",
ChildNodes: []Node{},
},
0x3c77ba8,
NewPositionFromString("line:59:3, col:65"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-04-09 11:52:21 -04:00
}
runNodeTests(t, nodes)
}