github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/ast/init_list_expr_test.go (about)

     1  package ast
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestInitListExpr(t *testing.T) {
     8  	nodes := map[string]Node{
     9  		`0x7fbdd1906c20 <col:52, line:17160:1> 'const unsigned char [256]'`: &InitListExpr{
    10  			Addr:       0x7fbdd1906c20,
    11  			Pos:        NewPositionFromString("col:52, line:17160:1"),
    12  			Type1:      "const unsigned char [256]",
    13  			ChildNodes: []Node{},
    14  		},
    15  		`0x32017f0 <col:24, col:41> 'struct node [2]'`: &InitListExpr{
    16  			Addr:       0x32017f0,
    17  			Pos:        NewPositionFromString("col:24, col:41"),
    18  			Type1:      "struct node [2]",
    19  			ChildNodes: []Node{},
    20  		},
    21  		`0x3201840 <col:25, col:31> 'struct node':'struct node'`: &InitListExpr{
    22  			Addr:       0x3201840,
    23  			Pos:        NewPositionFromString("col:25, col:31"),
    24  			Type1:      "struct node",
    25  			Type2:      "struct node",
    26  			ChildNodes: []Node{},
    27  		},
    28  	}
    29  
    30  	runNodeTests(t, nodes)
    31  }