(t *testing.T)
| 1324 | } |
| 1325 | |
| 1326 | func 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 | |
| 1347 | func TestPrinterPrintBinarySpaceship(t *testing.T) { |
| 1348 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…