nswrap/ast/character_literal_test.go

24 lines
428 B
Go
Raw Normal View History

2019-04-09 11:52:21 -04:00
package ast
import (
"testing"
)
func TestCharacterLiteral(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x7f980b858308 <col:62> 'int' 10`: testNode{&CharacterLiteral{
2019-04-09 11:52:21 -04:00
Addr: 0x7f980b858308,
Pos: NewPositionFromString("col:62"),
Type: "int",
Value: 10,
ChildNodes: []Node{},
},
0x7f980b858308,
NewPositionFromString("col:62"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-04-09 11:52:21 -04:00
}
runNodeTests(t, nodes)
}