2019-04-09 11:52:21 -04:00
|
|
|
package ast
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestEnumDecl(t *testing.T) {
|
2019-06-04 00:14:04 -04:00
|
|
|
nodes := map[string]testNode{
|
2019-06-11 12:38:22 -04:00
|
|
|
`0x22a6c80 <line:180:1, line:186:1> __codecvt_result`: testNode{&EnumDecl{
|
2019-04-09 11:52:21 -04:00
|
|
|
Addr: 0x22a6c80,
|
|
|
|
Pos: NewPositionFromString("line:180:1, line:186:1"),
|
|
|
|
Position2: "",
|
|
|
|
Name: "__codecvt_result",
|
|
|
|
ChildNodes: []Node{},
|
|
|
|
},
|
2019-06-11 12:38:22 -04:00
|
|
|
0x22a6c80,
|
|
|
|
NewPositionFromString("line:180:1, line:186:1"),
|
|
|
|
[]Node{},
|
2019-06-04 00:14:04 -04:00
|
|
|
},
|
2019-06-11 12:38:22 -04:00
|
|
|
`0x32fb5a0 <enum.c:3:1, col:45> col:6 week`: testNode{&EnumDecl{
|
2019-04-09 11:52:21 -04:00
|
|
|
Addr: 0x32fb5a0,
|
|
|
|
Pos: NewPositionFromString("enum.c:3:1, col:45"),
|
|
|
|
Position2: " col:6",
|
|
|
|
Name: "week",
|
|
|
|
ChildNodes: []Node{},
|
|
|
|
},
|
2019-06-11 12:38:22 -04:00
|
|
|
0x32fb5a0,
|
|
|
|
NewPositionFromString("enum.c:3:1, col:45"),
|
|
|
|
[]Node{},
|
2019-06-04 00:14:04 -04:00
|
|
|
},
|
2019-04-09 11:52:21 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
runNodeTests(t, nodes)
|
|
|
|
}
|