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

     1  package ast
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestVAArgExpr(t *testing.T) {
     8  	nodes := map[string]Node{
     9  		`0x7ff7d314bca8 <col:6, col:31> 'int *'`: &VAArgExpr{
    10  			Addr:       0x7ff7d314bca8,
    11  			Pos:        NewPositionFromString("col:6, col:31"),
    12  			Type:       "int *",
    13  			ChildNodes: []Node{},
    14  		},
    15  
    16  		`0x46f93e8 <col:28, col:58> 'LOGFUNC_t':'void (*)(void *, int, const char *)'`: &VAArgExpr{
    17  			Addr:       0x46f93e8,
    18  			Pos:        NewPositionFromString("col:28, col:58"),
    19  			Type:       "LOGFUNC_t",
    20  			Type2:      "void (*)(void *, int, const char *)",
    21  			ChildNodes: []Node{},
    22  		},
    23  		`0x46f99b8 <col:30, col:64> 'sqlite3_int64':'long long'`: &VAArgExpr{
    24  			Addr:       0x46f99b8,
    25  			Pos:        NewPositionFromString("col:30, col:64"),
    26  			Type:       "sqlite3_int64",
    27  			Type2:      "long long",
    28  			ChildNodes: []Node{},
    29  		},
    30  	}
    31  
    32  	runNodeTests(t, nodes)
    33  }