(t *testing.T)
| 394 | } |
| 395 | |
| 396 | func TestNodeCount(t *testing.T) { |
| 397 | if ast.NodeCount(nil) != 0 { |
| 398 | t.Errorf("NodeCount(nil) got %d, wanted 0", ast.NodeCount(nil)) |
| 399 | } |
| 400 | checked := mustTypeCheck(t, `1 + 2`) |
| 401 | if count := ast.NodeCount(checked); count != 3 { |
| 402 | t.Errorf("NodeCount(1 + 2) got %d, wanted 3", count) |
| 403 | } |
| 404 | } |
| 405 | |
| 406 | func TestHeights(t *testing.T) { |
| 407 | tests := []struct { |
nothing calls this directly
no test coverage detected