github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/ast/cxx_method_decl_test.go (about) 1 package ast 2 3 import ( 4 "testing" 5 ) 6 7 func TestCXXMethodDecl(t *testing.T) { 8 nodes := map[string]Node{ 9 `0x38a32c0 <line:25:5, col:37> col:9 area 'int (void)'`: &CXXMethodDecl{ 10 Addr: 0x38a32c0, 11 Parent: "", 12 Prev: "", 13 Pos: NewPositionFromString("line:25:5, col:37"), 14 Position2: "col:9", 15 IsImplicit: false, 16 IsUsed: false, 17 MethodName: "area", 18 Type: "int (void)", 19 IsInline: false, 20 Other: "", 21 ChildNodes: []Node{}, 22 }, 23 `0x38a32c0 <line:25:5, col:37> col:9 used area 'int (void)'`: &CXXMethodDecl{ 24 Addr: 0x38a32c0, 25 Parent: "", 26 Prev: "", 27 Pos: NewPositionFromString("line:25:5, col:37"), 28 Position2: "col:9", 29 IsImplicit: false, 30 IsUsed: true, 31 MethodName: "area", 32 Type: "int (void)", 33 IsInline: false, 34 Other: "", 35 ChildNodes: []Node{}, 36 }, 37 } 38 39 runNodeTests(t, nodes) 40 }