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

@ -3,11 +3,11 @@ package chart
import (
"testing"
assert "github.com/blend/go-sdk/assert"
"github.com/wcharczuk/go-chart/v2/testutil"
)
func TestConcatSeries(t *testing.T) {
assert := assert.New(t)
// replaced new assertions helper
s1 := ContinuousSeries{
XValues: LinearRange(1.0, 10.0),
@ -25,17 +25,17 @@ func TestConcatSeries(t *testing.T) {
}
cs := ConcatSeries([]Series{s1, s2, s3})
assert.Equal(30, cs.Len())
testutil.AssertEqual(t, 30, cs.Len())
x0, y0 := cs.GetValue(0)
assert.Equal(1.0, x0)
assert.Equal(1.0, y0)
testutil.AssertEqual(t, 1.0, x0)
testutil.AssertEqual(t, 1.0, y0)
xm, ym := cs.GetValue(19)
assert.Equal(20.0, xm)
assert.Equal(1.0, ym)
testutil.AssertEqual(t, 20.0, xm)
testutil.AssertEqual(t, 1.0, ym)
xn, yn := cs.GetValue(29)
assert.Equal(30.0, xn)
assert.Equal(10.0, yn)
testutil.AssertEqual(t, 30.0, xn)
testutil.AssertEqual(t, 10.0, yn)
}