MCPcopy Index your code
hub / github.com/dreadl0ck/netcap / TestNumericMinMaxEncoder

Function TestNumericMinMaxEncoder

encoder/encoder_test.go:131–143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

129}
130
131func TestNumericMinMaxEncoder(t *testing.T) {
132 var encoder = NewValueEncoder()
133 encoder.conf = &Config{
134 MinMax: true,
135 }
136
137 var res []string
138 for _, val := range numericTest {
139 res = append(res, encoder.Int("bytes", val))
140 }
141
142 assert.Equal(t, res, []string{"0.0000000000", "0.0000000000", "1.0000000000", "0.7500000000", "0.0000000000", "1.0000000000"}, "unexpected output")
143}
144
145var categoricalTest = []string{
146 "TCP",

Callers

nothing calls this directly

Calls 2

NewValueEncoderFunction · 0.85
IntMethod · 0.80

Tested by

no test coverage detected