(t *testing.T)
| 4402 | } |
| 4403 | |
| 4404 | func TestPrinterPrintStmtUnset(t *testing.T) { |
| 4405 | o := bytes.NewBufferString("") |
| 4406 | |
| 4407 | p := printer.NewPrinter(o) |
| 4408 | p.Print(&stmt.Unset{ |
| 4409 | Vars: []node.Node{ |
| 4410 | &expr.Variable{ |
| 4411 | VarName: &node.Identifier{Value: "a"}, |
| 4412 | }, |
| 4413 | &expr.Variable{ |
| 4414 | VarName: &node.Identifier{Value: "b"}, |
| 4415 | }, |
| 4416 | }, |
| 4417 | }) |
| 4418 | |
| 4419 | expected := `unset($a,$b);` |
| 4420 | actual := o.String() |
| 4421 | |
| 4422 | if expected != actual { |
| 4423 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 4424 | } |
| 4425 | } |
| 4426 | |
| 4427 | func TestPrinterPrintStmtUseList(t *testing.T) { |
| 4428 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…