(t *testing.T)
| 81 | var numericTestFloat = []float64{5, 2, 6, 5, 2, 6} |
| 82 | |
| 83 | func TestNumericZscoreEncoder(t *testing.T) { |
| 84 | var encoder = NewValueEncoder() |
| 85 | encoder.conf = &Config{ |
| 86 | ZScore: true, |
| 87 | } |
| 88 | |
| 89 | var res []string |
| 90 | for _, val := range numericTest { |
| 91 | res = append(res, encoder.Int("bytes", val)) |
| 92 | } |
| 93 | |
| 94 | assert.Equal(t, res, []string{"0.7071067812", "-0.7071067812", "0.7071067812", "0.7071067812", "-0.7071067812", "0.7071067812"}, "unexpected output") |
| 95 | } |
| 96 | |
| 97 | func TestZscoreAllData(t *testing.T) { |
| 98 |
nothing calls this directly
no test coverage detected