(t *testing.T)
| 203 | } |
| 204 | |
| 205 | func TestPrinterPrintArgument(t *testing.T) { |
| 206 | o := bytes.NewBufferString("") |
| 207 | |
| 208 | p := printer.NewPrinter(o) |
| 209 | p.Print(&node.Argument{ |
| 210 | IsReference: false, |
| 211 | Variadic: true, |
| 212 | Expr: &expr.Variable{ |
| 213 | VarName: &node.Identifier{ |
| 214 | Value: "var", |
| 215 | }, |
| 216 | }, |
| 217 | }) |
| 218 | |
| 219 | expected := "...$var" |
| 220 | actual := o.String() |
| 221 | |
| 222 | if expected != actual { |
| 223 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 224 | } |
| 225 | } |
| 226 | func TestPrinterPrintArgumentByRef(t *testing.T) { |
| 227 | o := bytes.NewBufferString("") |
| 228 |
nothing calls this directly
no test coverage detected
searching dependent graphs…