(t *testing.T)
| 4021 | } |
| 4022 | |
| 4023 | func TestPrinterPrintStaticVar(t *testing.T) { |
| 4024 | o := bytes.NewBufferString("") |
| 4025 | |
| 4026 | p := printer.NewPrinter(o) |
| 4027 | p.Print(&stmt.StaticVar{ |
| 4028 | Variable: &expr.Variable{ |
| 4029 | VarName: &node.Identifier{Value: "a"}, |
| 4030 | }, |
| 4031 | Expr: &scalar.Lnumber{Value: "1"}, |
| 4032 | }) |
| 4033 | |
| 4034 | expected := `$a=1` |
| 4035 | actual := o.String() |
| 4036 | |
| 4037 | if expected != actual { |
| 4038 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 4039 | } |
| 4040 | } |
| 4041 | |
| 4042 | func TestPrinterPrintStatic(t *testing.T) { |
| 4043 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…