22 lines
403 B
Go
22 lines
403 B
Go
package ast
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestWhileStmt(t *testing.T) {
|
|
nodes := map[string]testNode{
|
|
`0x7fa1478273a0 <line:7:4, line:11:4>`: testNode{&WhileStmt{
|
|
Addr: 0x7fa1478273a0,
|
|
Pos: NewPositionFromString("line:7:4, line:11:4"),
|
|
ChildNodes: []Node{},
|
|
},
|
|
0x7fa1478273a0,
|
|
NewPositionFromString("line:7:4, line:11:4"),
|
|
[]Node{},
|
|
},
|
|
}
|
|
|
|
runNodeTests(t, nodes)
|
|
}
|