github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/ast/binary_operator_test.go (about) 1 package ast 2 3 import ( 4 "testing" 5 ) 6 7 func TestBinaryOperator(t *testing.T) { 8 nodes := map[string]Node{ 9 `0x7fca2d8070e0 <col:11, col:23> 'unsigned char' '='`: &BinaryOperator{ 10 Addr: 0x7fca2d8070e0, 11 Pos: NewPositionFromString("col:11, col:23"), 12 Type: "unsigned char", 13 Operator: "=", 14 ChildNodes: []Node{}, 15 }, 16 `0x1ff95b8 <line:78:2, col:7> 'T_ENUM':'T_ENUM' '='`: &BinaryOperator{ 17 Addr: 0x1ff95b8, 18 Pos: NewPositionFromString("line:78:2, col:7"), 19 Type: "T_ENUM", 20 Type2: "T_ENUM", 21 Operator: "=", 22 ChildNodes: []Node{}, 23 }, 24 `0x2fdedd0 <col:204, col:223> 'int' lvalue '='`: &BinaryOperator{ 25 Addr: 0x2fdedd0, 26 Pos: NewPositionFromString("col:204, col:223"), 27 Type: "int", 28 Type2: "", 29 IsLvalue: true, 30 Operator: "=", 31 ChildNodes: []Node{}, 32 }, 33 } 34 35 runNodeTests(t, nodes) 36 }