(t *testing.T)
| 550 | } |
| 551 | |
| 552 | func TestPrintAssignMod(t *testing.T) { |
| 553 | o := bytes.NewBufferString("") |
| 554 | |
| 555 | p := printer.NewPrettyPrinter(o, " ") |
| 556 | p.Print(&assign.Mod{ |
| 557 | Variable: &expr.Variable{VarName: &node.Identifier{Value: "a"}}, |
| 558 | Expression: &expr.Variable{VarName: &node.Identifier{Value: "b"}}, |
| 559 | }) |
| 560 | |
| 561 | expected := `$a %= $b` |
| 562 | actual := o.String() |
| 563 | |
| 564 | if expected != actual { |
| 565 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | func TestPrintAssignMul(t *testing.T) { |
| 570 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…