(t *testing.T)
| 163 | } |
| 164 | |
| 165 | func TestCallNil(t *testing.T) { |
| 166 | expr := nilTestExpr(t) |
| 167 | call := expr.AsCall() |
| 168 | if call.FunctionName() != "" { |
| 169 | t.Errorf("FunctionName() got %s, wanted empty value", call.FunctionName()) |
| 170 | } |
| 171 | if len(call.Args()) != 0 { |
| 172 | t.Errorf("Args() got %v, wanted zero", call.Args()) |
| 173 | } |
| 174 | if call.IsMemberFunction() { |
| 175 | t.Error("IsMemberFunction() got true, wanted false") |
| 176 | } |
| 177 | if call.Target().ID() != 0 { |
| 178 | t.Errorf("empty Target() got %d, wanted 0", call.Target().ID()) |
| 179 | } |
| 180 | expr.RenumberIDs(testIDGen(100)) |
| 181 | if expr.ID() != 101 { |
| 182 | t.Errorf("RenumberIDs() got %d, wanted 101", expr.ID()) |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | func TestComprehension(t *testing.T) { |
| 187 | fac := ast.NewExprFactory() |
nothing calls this directly
no test coverage detected