(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestContextLookupTypeNamedAndLookupTypeDef(t *testing.T) { |
| 23 | sctx := super.NewContext() |
| 24 | |
| 25 | assert.Nil(t, sctx.LookupTypeDef("x")) |
| 26 | |
| 27 | named1, err := sctx.LookupTypeNamed("x", super.TypeNull) |
| 28 | require.NoError(t, err) |
| 29 | assert.Same(t, named1, sctx.LookupTypeDef("x")) |
| 30 | |
| 31 | named2, err := sctx.LookupTypeNamed("x", super.TypeInt8) |
| 32 | require.NoError(t, err) |
| 33 | assert.Same(t, named2, sctx.LookupTypeDef("x")) |
| 34 | |
| 35 | named3, err := sctx.LookupTypeNamed("x", super.TypeNull) |
| 36 | require.NoError(t, err) |
| 37 | assert.Same(t, named3, sctx.LookupTypeDef("x")) |
| 38 | assert.Same(t, named3, named1) |
| 39 | } |
| 40 | |
| 41 | func TestContextTranslateTypeNameConflictUnion(t *testing.T) { |
| 42 | // This test confirms that a union with complicated type renaming is properly |
nothing calls this directly
no test coverage detected