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

     1  package ast
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestNoThrowAttr(t *testing.T) {
     8  	nodes := map[string]Node{
     9  		`0x7fa1488273a0 <line:7:4, line:11:4>`: &NoThrowAttr{
    10  			Addr:        0x7fa1488273a0,
    11  			Pos:         NewPositionFromString("line:7:4, line:11:4"),
    12  			ChildNodes:  []Node{},
    13  			IsInherited: false,
    14  			IsImplicit:  false,
    15  		},
    16  		`0x5605ceaf4b88 <col:12> Implicit`: &NoThrowAttr{
    17  			Addr:        0x5605ceaf4b88,
    18  			Pos:         NewPositionFromString("col:12"),
    19  			ChildNodes:  []Node{},
    20  			IsInherited: false,
    21  			IsImplicit:  true,
    22  		},
    23  		`0x4153c50 </usr/include/unistd.h:779:46> Inherited`: &NoThrowAttr{
    24  			Addr:        0x4153c50,
    25  			Pos:         NewPositionFromString("/usr/include/unistd.h:779:46"),
    26  			ChildNodes:  []Node{},
    27  			IsInherited: true,
    28  			IsImplicit:  false,
    29  		},
    30  		`0x1038b8828 <col:20> Inherited Implicit`: &NoThrowAttr{
    31  			Addr:        0x1038b8828,
    32  			Pos:         NewPositionFromString("col:20"),
    33  			ChildNodes:  []Node{},
    34  			IsInherited: true,
    35  			IsImplicit:  true,
    36  		},
    37  	}
    38  
    39  	runNodeTests(t, nodes)
    40  }