(t *testing.T)
| 431 | } |
| 432 | |
| 433 | func TestPrintReference(t *testing.T) { |
| 434 | o := bytes.NewBufferString("") |
| 435 | |
| 436 | p := printer.NewPrettyPrinter(o, " ") |
| 437 | p.Print(&assign.Reference{ |
| 438 | Variable: &expr.Variable{VarName: &node.Identifier{Value: "a"}}, |
| 439 | Expression: &expr.Variable{VarName: &node.Identifier{Value: "b"}}, |
| 440 | }) |
| 441 | |
| 442 | expected := `$a =& $b` |
| 443 | actual := o.String() |
| 444 | |
| 445 | if expected != actual { |
| 446 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | func TestPrintAssignBitwiseAnd(t *testing.T) { |
| 451 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…