(t *testing.T)
| 263 | } |
| 264 | |
| 265 | func TestIdent(t *testing.T) { |
| 266 | fac := ast.NewExprFactory() |
| 267 | id := fac.NewIdent(1, "a") |
| 268 | if id.AsIdent() != "a" { |
| 269 | t.Errorf("id.AsIdent() got %s, wanted 'a'", id.AsIdent()) |
| 270 | } |
| 271 | id.RenumberIDs(testIDGen(50)) |
| 272 | if id.ID() != 51 { |
| 273 | t.Errorf("id.ID() got %d, wanted 51", id.ID()) |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | func TestIdentNil(t *testing.T) { |
| 278 | expr := nilTestExpr(t) |
nothing calls this directly
no test coverage detected