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

     1  package ast
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestWeakAttr(t *testing.T) {
     8  	nodes := map[string]Node{
     9  		`0x56069ece5110 <line:736:22>`: &WeakAttr{
    10  			Addr:       0x56069ece5110,
    11  			Pos:        NewPositionFromString("line:736:22"),
    12  			ChildNodes: []Node{},
    13  		},
    14  		`0x20c6ad0 </glibc-2.27/support/temp_file-internal.h:27:62> Inherited`: &WeakAttr{
    15  			Addr:        0x20c6ad0,
    16  			Pos:         NewPositionFromString("/glibc-2.27/support/temp_file-internal.h:27:62"),
    17  			IsInherited: true,
    18  			ChildNodes:  []Node{},
    19  		},
    20  	}
    21  
    22  	runNodeTests(t, nodes)
    23  }