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

Function TestPrinterPrintBinarySmaller

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

Source from the content-addressed store, hash-verified

1324}
1325
1326func TestPrinterPrintBinarySmaller(t *testing.T) {
1327 o := bytes.NewBufferString("")
1328
1329 p := printer.NewPrinter(o)
1330 p.Print(&binary.Smaller{
1331 Left: &expr.Variable{
1332 VarName: &node.Identifier{Value: "a"},
1333 },
1334 Right: &expr.Variable{
1335 VarName: &node.Identifier{Value: "b"},
1336 },
1337 })
1338
1339 expected := `$a<$b`
1340 actual := o.String()
1341
1342 if expected != actual {
1343 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1344 }
1345}
1346
1347func TestPrinterPrintBinarySpaceship(t *testing.T) {
1348 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…