MCPcopy Create free account
hub / github.com/brimdata/super / TestTypeValueCrossContext

Function TestTypeValueCrossContext

sup/typeval_test.go:20–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18}
19
20func TestTypeValueCrossContext(t *testing.T) {
21 const s = "{A:{B:int64},C:int32}"
22 sctx := super.NewContext()
23 typ, err := sup.ParseType(sctx, s)
24 require.NoError(t, err)
25 other := super.NewContext()
26 otherType, err := other.TranslateType(typ)
27 require.NoError(t, err)
28 tv := other.LookupTypeValue(otherType)
29 require.Exactly(t, s, sup.FormatTypeValue(tv.Bytes()))
30}

Callers

nothing calls this directly

Calls 6

TranslateTypeMethod · 0.95
LookupTypeValueMethod · 0.95
NewContextFunction · 0.92
ParseTypeFunction · 0.92
FormatTypeValueFunction · 0.92
BytesMethod · 0.45

Tested by

no test coverage detected