github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/ast/warn_unused_result_attr_test.go (about) 1 package ast 2 3 import ( 4 "testing" 5 ) 6 7 func TestWarnUnusedResultAttr(t *testing.T) { 8 nodes := map[string]Node{ 9 `0x7fa1d704d420 <col:60> warn_unused_result`: &WarnUnusedResultAttr{ 10 Addr: 0x7fa1d704d420, 11 Pos: NewPositionFromString("col:60"), 12 Inherited: false, 13 ChildNodes: []Node{}, 14 }, 15 `0x1fac810 <line:481:52>`: &WarnUnusedResultAttr{ 16 Addr: 0x1fac810, 17 Pos: NewPositionFromString("line:481:52"), 18 Inherited: false, 19 ChildNodes: []Node{}, 20 }, 21 `0x3794590 </home/kph/co/util-linux/libblkid/src/blkidP.h:374:19> Inherited`: &WarnUnusedResultAttr{ 22 Addr: 0x3794590, 23 Pos: NewPositionFromString("/home/kph/co/util-linux/libblkid/src/blkidP.h:374:19"), 24 Inherited: true, 25 ChildNodes: []Node{}, 26 }, 27 `0x1def418 <col:53> warn_unused_result ""`: &WarnUnusedResultAttr{ 28 Addr: 0x1def418, 29 Pos: NewPositionFromString("col:53"), 30 Inherited: false, 31 Other: " \"\"", 32 ChildNodes: []Node{}, 33 }, 34 } 35 36 runNodeTests(t, nodes) 37 }