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

Function TestPrinterPrintBinaryIdentical

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

Source from the content-addressed store, hash-verified

1030}
1031
1032func TestPrinterPrintBinaryIdentical(t *testing.T) {
1033 o := bytes.NewBufferString("")
1034
1035 p := printer.NewPrinter(o)
1036 p.Print(&binary.Identical{
1037 Left: &expr.Variable{
1038 VarName: &node.Identifier{Value: "a"},
1039 },
1040 Right: &expr.Variable{
1041 VarName: &node.Identifier{Value: "b"},
1042 },
1043 })
1044
1045 expected := `$a===$b`
1046 actual := o.String()
1047
1048 if expected != actual {
1049 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1050 }
1051}
1052
1053func TestPrinterPrintBinaryLogicalAnd(t *testing.T) {
1054 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…