ditto w/ the other test.

This commit is contained in:
Will Charczuk 2016-07-14 13:14:02 -07:00
parent dd7970910e
commit 21a7c8c83a

View file

@ -66,9 +66,16 @@ func TestMovingAverageSeriesGetLastValueWindowOverlap(t *testing.T) {
WindowSize: 15, WindowSize: 15,
} }
var yvalues []float64
for x := 0; x < mas.Len(); x++ {
_, y := mas.GetValue(x)
yvalues = append(yvalues, y)
}
lx, ly := mas.GetLastValue() lx, ly := mas.GetLastValue()
assert.Equal(10.0, lx) assert.Equal(10.0, lx)
assert.Equal(5.5, ly) assert.Equal(5.5, ly)
assert.Equal(yvalues[len(yvalues)-1], ly)
} }
func TestMovingAverageSeriesGetLastValue(t *testing.T) { func TestMovingAverageSeriesGetLastValue(t *testing.T) {