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

Function TestNumericMinMaxEncoderZero

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

Source from the content-addressed store, hash-verified

64}
65
66func TestNumericMinMaxEncoderZero(t *testing.T) {
67 var encoder = NewValueEncoder()
68 encoder.conf = &Config{
69 MinMax: true,
70 }
71
72 var res []string
73 for _, val := range numericTestZero {
74 res = append(res, encoder.Int("bytes", val))
75 }
76
77 assert.Equal(t, res, []string{"0.0000000000", "0.0000000000", "0.0000000000", "0.0000000000", "0.0000000000", "0.0000000000"}, "unexpected output")
78}
79
80var numericTest = []int{5, 2, 6, 5, 2, 6}
81var numericTestFloat = []float64{5, 2, 6, 5, 2, 6}

Callers

nothing calls this directly

Calls 2

NewValueEncoderFunction · 0.85
IntMethod · 0.80

Tested by

no test coverage detected