MCPcopy Create free account
hub / github.com/facebook/time / TestMeasureChannelDatatypeMap

Function TestMeasureChannelDatatypeMap

calnex/api/api_test.go:669–688  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

667 r, err = parseResponse("too=many=parts")
668 require.Equal(t, "", r)
669 require.ErrorIs(t, errAPI, err)
670}
671
672func TestMeasureChannelDatatypeMap(t *testing.T) {
673 for i := 0; i <= 5; i++ {
674 ch, err := ChannelFromInt(i)
675 require.NoError(t, err)
676 require.Equal(t, TE, MeasureChannelDatatypeMap[*ch])
677 }
678
679 for i := 6; i <= 8; i++ {
680 ch, err := ChannelFromInt(i)
681 require.NoError(t, err)
682 _, ok := MeasureChannelDatatypeMap[*ch]
683 require.False(t, ok)
684 }
685
686 for i := 9; i <= 40; i++ {
687 ch, err := ChannelFromInt(i)
688 require.NoError(t, err)
689 require.Equal(t, TWOWAYTE, MeasureChannelDatatypeMap[*ch])
690 }
691}

Callers

nothing calls this directly

Calls 1

ChannelFromIntFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…