histogram still needs tweaking.
This commit is contained in:
parent
d455b775da
commit
7858457772
4 changed files with 233 additions and 1 deletions
29
macd_series_test.go
Normal file
29
macd_series_test.go
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package chart
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/blendlabs/go-assert"
|
||||
)
|
||||
|
||||
func TestMACDSeries(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
mockSeries := mockValueProvider{
|
||||
Seq(1.0, 100.0),
|
||||
SeqRand(100.0, 256),
|
||||
}
|
||||
assert.Equal(100, mockSeries.Len())
|
||||
|
||||
mas := &MACDSeries{
|
||||
InnerSeries: mockSeries,
|
||||
}
|
||||
|
||||
var yvalues []float64
|
||||
for x := 0; x < mas.Len(); x++ {
|
||||
_, y := mas.GetValue(x)
|
||||
yvalues = append(yvalues, y)
|
||||
}
|
||||
|
||||
assert.NotEmpty(yvalues)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue