(t *testing.T)
| 366 | } |
| 367 | |
| 368 | func TestMapEntryNil(t *testing.T) { |
| 369 | fac := ast.NewExprFactory() |
| 370 | field := fac.NewStructField(1, |
| 371 | "hello", fac.NewLiteral(3, types.String("world")), false) |
| 372 | |
| 373 | // intentionally convert the struct field to the wrong type |
| 374 | entry := field.AsMapEntry() |
| 375 | if entry.Key().Kind() != ast.UnspecifiedExprKind { |
| 376 | t.Errorf("entry.Key() got %s, wanted ''", entry.Key()) |
| 377 | } |
| 378 | if entry.Value().Kind() != ast.UnspecifiedExprKind { |
| 379 | t.Errorf("entry.Value() got %v, wanted unspecified", entry.Value()) |
| 380 | } |
| 381 | if entry.IsOptional() { |
| 382 | t.Errorf("entry.IsOptional() got %v, wanted ''", entry.IsOptional()) |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | func TestSelect(t *testing.T) { |
| 387 | fac := ast.NewExprFactory() |
nothing calls this directly
no test coverage detected