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

@ -4,11 +4,11 @@ import (
"bytes"
"testing"
assert "github.com/blend/go-sdk/assert"
"github.com/wcharczuk/go-chart/v2/testutil"
)
func TestPieChart(t *testing.T) {
assert := assert.New(t)
// replaced new assertions helper
pie := PieChart{
Canvas: Style{
@ -27,11 +27,11 @@ func TestPieChart(t *testing.T) {
b := bytes.NewBuffer([]byte{})
pie.Render(PNG, b)
assert.NotZero(b.Len())
testutil.AssertNotZero(t, b.Len())
}
func TestPieChartDropsZeroValues(t *testing.T) {
assert := assert.New(t)
// replaced new assertions helper
pie := PieChart{
Canvas: Style{
@ -46,11 +46,11 @@ func TestPieChartDropsZeroValues(t *testing.T) {
b := bytes.NewBuffer([]byte{})
err := pie.Render(PNG, b)
assert.Nil(err)
testutil.AssertNil(t, err)
}
func TestPieChartAllZeroValues(t *testing.T) {
assert := assert.New(t)
// replaced new assertions helper
pie := PieChart{
Canvas: Style{
@ -65,5 +65,5 @@ func TestPieChartAllZeroValues(t *testing.T) {
b := bytes.NewBuffer([]byte{})
err := pie.Render(PNG, b)
assert.NotNil(err)
testutil.AssertNotNil(t, err)
}