github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/ast/constant_expr_test.go (about) 1 package ast 2 3 import ( 4 "testing" 5 ) 6 7 func TestConstantExpr(t *testing.T) { 8 nodes := map[string]Node{ 9 `0x28f4a70 <line:223:7> 'int'`: &ConstantExpr{ 10 Addr: 0x28f4a70, 11 Pos: NewPositionFromString("line:223:7"), 12 Type: "int", 13 ChildNodes: []Node{}, 14 }, 15 `0x1adecf0 <line:327:10, col:15> 'int' 0`: &ConstantExpr{ 16 Addr: 0x1adecf0, 17 Pos: NewPositionFromString("line:327:10, col:15"), 18 Type: "int", 19 Value: "0", 20 ChildNodes: []Node{}, 21 }, 22 } 23 24 runNodeTests(t, nodes) 25 }