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

     1  package ast
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestAsmLabelAttr(t *testing.T) {
     8  	nodes := map[string]Node{
     9  		`0x7ff26d8224e8 </usr/include/sys/cdefs.h:569:36> "_fopen"`: &AsmLabelAttr{
    10  			Addr:         0x7ff26d8224e8,
    11  			Pos:          NewPositionFromString("/usr/include/sys/cdefs.h:569:36"),
    12  			IsInherited:  false,
    13  			FunctionName: "_fopen",
    14  			ChildNodes:   []Node{},
    15  		},
    16  		`0x7fd55a169318 </usr/include/stdio.h:325:47> Inherited "_popen"`: &AsmLabelAttr{
    17  			Addr:         0x7fd55a169318,
    18  			Pos:          NewPositionFromString("/usr/include/stdio.h:325:47"),
    19  			IsInherited:  true,
    20  			FunctionName: "_popen",
    21  			ChildNodes:   []Node{},
    22  		},
    23  		`0x1271fd0 <col:42> "__xpg_sigpause" IsLiteralLabel`: &AsmLabelAttr{
    24  			Addr:           0x1271fd0,
    25  			Pos:            NewPositionFromString("col:42"),
    26  			IsInherited:    false,
    27  			FunctionName:   "__xpg_sigpause",
    28  			IsLiteralLabel: true,
    29  			ChildNodes:     []Node{},
    30  		},
    31  	}
    32  
    33  	runNodeTests(t, nodes)
    34  }