(t *testing.T)
| 36 | s.pushDataPoint(dp3) |
| 37 | |
| 38 | got := s.takeDataPoint(3) |
| 39 | require.Len(t, got, 3) |
| 40 | require.Equal(t, dp3, got[0]) |
| 41 | require.Equal(t, dp2, got[1]) |
| 42 | require.Equal(t, dp1, got[2]) |
| 43 | } |
| 44 | |
| 45 | func TestTakeDataPointPartial(t *testing.T) { |
| 46 | s := newDaemonState(5) |
| 47 | |
| 48 | dp1 := &DataPoint{MasterOffsetNS: 1.0} |
| 49 | dp2 := &DataPoint{MasterOffsetNS: 2.0} |
| 50 | s.pushDataPoint(dp1) |
| 51 | s.pushDataPoint(dp2) |
| 52 | |
| 53 | got := s.takeDataPoint(5) |
| 54 | require.Len(t, got, 2) |
| 55 | } |
| 56 | |
| 57 | func TestTakeDataPointOverflow(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…