(t *testing.T)
| 516 | } |
| 517 | |
| 518 | func TestPrintAssignDiv(t *testing.T) { |
| 519 | o := bytes.NewBufferString("") |
| 520 | |
| 521 | p := printer.NewPrettyPrinter(o, " ") |
| 522 | p.Print(&assign.Div{ |
| 523 | Variable: &expr.Variable{VarName: &node.Identifier{Value: "a"}}, |
| 524 | Expression: &expr.Variable{VarName: &node.Identifier{Value: "b"}}, |
| 525 | }) |
| 526 | |
| 527 | expected := `$a /= $b` |
| 528 | actual := o.String() |
| 529 | |
| 530 | if expected != actual { |
| 531 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | func TestPrintAssignMinus(t *testing.T) { |
| 536 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…