(t *testing.T)
| 239 | } |
| 240 | |
| 241 | func TestComprehensionNil(t *testing.T) { |
| 242 | expr := nilTestExpr(t) |
| 243 | comp := expr.AsComprehension() |
| 244 | if comp.IterRange().Kind() != ast.UnspecifiedExprKind { |
| 245 | t.Errorf("IterRange() got %v, wanted unspecified", comp.IterRange().Kind()) |
| 246 | } |
| 247 | if comp.AccuInit().Kind() != ast.UnspecifiedExprKind { |
| 248 | t.Errorf("AccuInit() got %v, wanted unspecified", comp.AccuInit().Kind()) |
| 249 | } |
| 250 | if comp.LoopCondition().Kind() != ast.UnspecifiedExprKind { |
| 251 | t.Errorf("LoopCondition() got %v, wanted unspecified", comp.LoopCondition().Kind()) |
| 252 | } |
| 253 | if comp.LoopStep().Kind() != ast.UnspecifiedExprKind { |
| 254 | t.Errorf("LoopStep() got %v, wanted unspecified", comp.LoopStep().Kind()) |
| 255 | } |
| 256 | if comp.Result().Kind() != ast.UnspecifiedExprKind { |
| 257 | t.Errorf("Result() got %v, wanted unspecified", comp.Result().Kind()) |
| 258 | } |
| 259 | expr.RenumberIDs(testIDGen(100)) |
| 260 | if expr.ID() != 101 { |
| 261 | t.Errorf("RenumberIDs() got %d, wanted 101", expr.ID()) |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | func TestIdent(t *testing.T) { |
| 266 | fac := ast.NewExprFactory() |
nothing calls this directly
no test coverage detected