Adds support for go mod (finally) (#164)

This commit is contained in:
Will Charczuk 2020-11-22 16:45:10 -08:00 committed by GitHub
parent 962b9abdec
commit c1468e8ae4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
89 changed files with 1162 additions and 965 deletions

View file

@ -5,11 +5,11 @@ import (
"math"
"testing"
"github.com/blend/go-sdk/assert"
"github.com/wcharczuk/go-chart/v2/testutil"
)
func TestBollingerBandSeries(t *testing.T) {
assert := assert.New(t)
// replaced new assertions helper
s1 := mockValuesProvider{
X: LinearRange(1.0, 100.0),
@ -29,12 +29,12 @@ func TestBollingerBandSeries(t *testing.T) {
}
for x := bbs.GetPeriod(); x < 100; x++ {
assert.True(y1values[x] > y2values[x], fmt.Sprintf("%v vs. %v", y1values[x], y2values[x]))
testutil.AssertTrue(t, y1values[x] > y2values[x], fmt.Sprintf("%v vs. %v", y1values[x], y2values[x]))
}
}
func TestBollingerBandLastValue(t *testing.T) {
assert := assert.New(t)
// replaced new assertions helper
s1 := mockValuesProvider{
X: LinearRange(1.0, 100.0),
@ -46,7 +46,7 @@ func TestBollingerBandLastValue(t *testing.T) {
}
x, y1, y2 := bbs.GetBoundedLastValues()
assert.Equal(100.0, x)
assert.Equal(101, math.Floor(y1))
assert.Equal(83, math.Floor(y2))
testutil.AssertEqual(t, 100.0, x)
testutil.AssertEqual(t, 101, math.Floor(y1))
testutil.AssertEqual(t, 83, math.Floor(y2))
}