ditto w/ the other test.
This commit is contained in:
parent
dd7970910e
commit
21a7c8c83a
1 changed files with 7 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue