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

     1  package ast
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestDeprecatedAttr(t *testing.T) {
     8  	nodes := map[string]Node{
     9  		`0x7fec4b0ab9c0 <line:180:48, col:63> "This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead." ""`: &DeprecatedAttr{
    10  			Addr:        0x7fec4b0ab9c0,
    11  			Pos:         NewPositionFromString("line:180:48, col:63"),
    12  			Message1:    "This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead.",
    13  			Message2:    "",
    14  			IsInherited: false,
    15  			ChildNodes:  []Node{},
    16  		},
    17  		`0xb75d00 <line:1107:12> "This function or variable may be unsafe. Consider using _snwprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details." ""`: &DeprecatedAttr{
    18  			Addr:        0xb75d00,
    19  			Pos:         NewPositionFromString("line:1107:12"),
    20  			Message1:    "This function or variable may be unsafe. Consider using _snwprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.",
    21  			Message2:    "",
    22  			IsInherited: false,
    23  			ChildNodes:  []Node{},
    24  		},
    25  		`0xb75d00 <line:1107:12> Inherited "This function or variable may be unsafe. Consider using _snwprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details." ""`: &DeprecatedAttr{
    26  			Addr:        0xb75d00,
    27  			Pos:         NewPositionFromString("line:1107:12"),
    28  			Message1:    "This function or variable may be unsafe. Consider using _snwprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.",
    29  			Message2:    "",
    30  			IsInherited: true,
    31  			ChildNodes:  []Node{},
    32  		},
    33  	}
    34  
    35  	runNodeTests(t, nodes)
    36  }