github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/ast/compound_literal_expr_test.go (about) 1 package ast 2 3 import ( 4 "testing" 5 ) 6 7 func TestCompoundLiteralExpr(t *testing.T) { 8 nodes := map[string]Node{ 9 `0x5575acce81f0 <col:21, col:40> 'struct node':'struct node' lvalue`: &CompoundLiteralExpr{ 10 Addr: 0x5575acce81f0, 11 Pos: NewPositionFromString("col:21, col:40"), 12 Type1: "struct node", 13 Type2: "struct node", 14 IsLvalue: true, 15 ChildNodes: []Node{}, 16 }, 17 `0x350b398 <col:24, col:31> '__CONST_SOCKADDR_ARG':'__CONST_SOCKADDR_ARG'`: &CompoundLiteralExpr{ 18 Addr: 0x350b398, 19 Pos: NewPositionFromString("col:24, col:31"), 20 Type1: "__CONST_SOCKADDR_ARG", 21 Type2: "__CONST_SOCKADDR_ARG", 22 IsLvalue: false, 23 ChildNodes: []Node{}, 24 }, 25 } 26 27 runNodeTests(t, nodes) 28 }