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

     1  package ast
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestLinkageSpecDecl(t *testing.T) {
     8  	nodes := map[string]Node{
     9  		`0x2efe7d8 <col:146> col:146 implicit C`: &LinkageSpecDecl{
    10  			Addr:       0x2efe7d8,
    11  			Pos:        NewPositionFromString("col:146"),
    12  			Position2:  "col:146",
    13  			IsImplicit: true,
    14  			Name:       "C",
    15  			ChildNodes: []Node{},
    16  		},
    17  		`0x266fad0 <line:74:1, line:94:1> line:74:8 C++`: &LinkageSpecDecl{
    18  			Addr:       0x266fad0,
    19  			Pos:        NewPositionFromString("line:74:1, line:94:1"),
    20  			Position2:  "line:74:8",
    21  			IsImplicit: false,
    22  			Name:       "C++",
    23  			ChildNodes: []Node{},
    24  		},
    25  	}
    26  
    27  	runNodeTests(t, nodes)
    28  }