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

Function TestPrinterPrintBinaryNotIdentical

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

Source from the content-addressed store, hash-verified

1198}
1199
1200func TestPrinterPrintBinaryNotIdentical(t *testing.T) {
1201 o := bytes.NewBufferString("")
1202
1203 p := printer.NewPrinter(o)
1204 p.Print(&binary.NotIdentical{
1205 Left: &expr.Variable{
1206 VarName: &node.Identifier{Value: "a"},
1207 },
1208 Right: &expr.Variable{
1209 VarName: &node.Identifier{Value: "b"},
1210 },
1211 })
1212
1213 expected := `$a!==$b`
1214 actual := o.String()
1215
1216 if expected != actual {
1217 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1218 }
1219}
1220
1221func TestPrinterPrintBinaryPlus(t *testing.T) {
1222 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…