(t *testing.T)
| 96 | } |
| 97 | |
| 98 | func TestPrepareMathParametersSinglePoint(t *testing.T) { |
| 99 | dataPoints := []*DataPoint{ |
| 100 | {MasterOffsetNS: 42.0, PathDelayNS: 123.0, FreqAdjustmentPPB: 999.0, ClockAccuracyNS: 10.0}, |
| 101 | } |
| 102 | |
| 103 | got := prepareMathParameters(dataPoints) |
| 104 | require.Equal(t, []float64{42.0}, got["offset"]) |
| 105 | require.Equal(t, []float64{123.0}, got["delay"]) |
| 106 | require.Equal(t, []float64{999.0}, got["freq"]) |
| 107 | require.Equal(t, []float64{10.0}, got["clockaccuracy"]) |
| 108 | require.Empty(t, got["freqchange"]) |
| 109 | require.Empty(t, got["freqchangeabs"]) |
| 110 | } |
| 111 | |
| 112 | func TestMapOfInterface(t *testing.T) { |
| 113 | input := map[string][]float64{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…