github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/ast/alloc_size_attr_test.go (about) 1 package ast 2 3 import ( 4 "testing" 5 ) 6 7 func TestAllocSizeAttr(t *testing.T) { 8 nodes := map[string]Node{ 9 `0x7f8e390a5d38 <col:100, col:114> 1 2`: &AllocSizeAttr{ 10 Addr: 0x7f8e390a5d38, 11 Pos: NewPositionFromString("col:100, col:114"), 12 A: 1, 13 B: 2, 14 ChildNodes: []Node{}, 15 }, 16 `0x7fbd1a167f48 </usr/include/stdlib.h:342:37> Inherited 1 0`: &AllocSizeAttr{ 17 Addr: 0x7fbd1a167f48, 18 Pos: NewPositionFromString("/usr/include/stdlib.h:342:37"), 19 IsInherited: true, 20 A: 1, 21 B: 0, 22 ChildNodes: []Node{}, 23 }, 24 `0xb8abfd90 <col:100, col:116> 2`: &AllocSizeAttr{ 25 Addr: 0xb8abfd90, 26 Pos: NewPositionFromString("col:100, col:116"), 27 IsInherited: false, 28 A: 2, 29 B: 0, 30 ChildNodes: []Node{}, 31 }, 32 } 33 34 runNodeTests(t, nodes) 35 }