github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/ast/c_style_cast_expr_test.go (about) 1 package ast 2 3 import ( 4 "testing" 5 ) 6 7 func TestCStyleCastExpr(t *testing.T) { 8 nodes := map[string]Node{ 9 `0x7fddc18fb2e0 <col:50, col:56> 'char' <IntegralCast>`: &CStyleCastExpr{ 10 Addr: 0x7fddc18fb2e0, 11 Pos: NewPositionFromString("col:50, col:56"), 12 Type: "char", 13 Kind: "IntegralCast", 14 ChildNodes: []Node{}, 15 }, 16 `0x2781518 <col:7, col:17> 'T_ENUM':'T_ENUM' <IntegralCast>`: &CStyleCastExpr{ 17 Addr: 0x2781518, 18 Pos: NewPositionFromString("col:7, col:17"), 19 Type: "T_ENUM", 20 Type2: "T_ENUM", 21 Kind: "IntegralCast", 22 ChildNodes: []Node{}, 23 }, 24 } 25 26 runNodeTests(t, nodes) 27 }