MCPcopy Create free account
hub / github.com/z7zmey/php-parser / TestPrinterPrintBinaryShiftRight

Function TestPrinterPrintBinaryShiftRight

printer/printer_test.go:1284–1303  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1282}
1283
1284func TestPrinterPrintBinaryShiftRight(t *testing.T) {
1285 o := bytes.NewBufferString("")
1286
1287 p := printer.NewPrinter(o)
1288 p.Print(&binary.ShiftRight{
1289 Left: &expr.Variable{
1290 VarName: &node.Identifier{Value: "a"},
1291 },
1292 Right: &expr.Variable{
1293 VarName: &node.Identifier{Value: "b"},
1294 },
1295 })
1296
1297 expected := `$a>>$b`
1298 actual := o.String()
1299
1300 if expected != actual {
1301 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1302 }
1303}
1304
1305func TestPrinterPrintBinarySmallerOrEqual(t *testing.T) {
1306 o := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…