(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func TestDuplicates(t *testing.T) { |
| 95 | ctx := super.NewContext() |
| 96 | setType := ctx.LookupTypeSet(super.TypeInt32) |
| 97 | typ1, err := ctx.LookupTypeRecord([]super.Field{ |
| 98 | {"a", super.TypeString, false}, |
| 99 | {"b", setType, false}, |
| 100 | }) |
| 101 | require.NoError(t, err) |
| 102 | typ2, err := sup.ParseType(ctx, "{a:string,b:|[int32]|}") |
| 103 | require.NoError(t, err) |
| 104 | assert.EqualValues(t, typ1.ID(), typ2.ID()) |
| 105 | assert.EqualValues(t, setType.ID(), typ2.(*super.TypeRecord).Fields[1].Type.ID()) |
| 106 | typ3, err := ctx.LookupByValue(super.EncodeTypeValue(setType)) |
| 107 | require.NoError(t, err) |
| 108 | assert.Equal(t, setType.ID(), typ3.ID()) |
| 109 | } |
| 110 | |
| 111 | func TestTranslateNamed(t *testing.T) { |
| 112 | c1 := super.NewContext() |
nothing calls this directly
no test coverage detected