refactor: change project structure and package name

This commit is contained in:
Rico 2022-08-27 17:21:43 +02:00
parent c1468e8ae4
commit ad10e9a062
No known key found for this signature in database
GPG key ID: 91F477359C5B7AD3
163 changed files with 104 additions and 135 deletions

View file

@ -0,0 +1,24 @@
package chart
import (
"testing"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestGenerateGridLines(t *testing.T) {
// replaced new assertions helper
ticks := []Tick{
{Value: 1.0, Label: "1.0"},
{Value: 2.0, Label: "2.0"},
{Value: 3.0, Label: "3.0"},
{Value: 4.0, Label: "4.0"},
}
gl := GenerateGridLines(ticks, Style{}, Style{})
testutil.AssertLen(t, gl, 2)
testutil.AssertEqual(t, 2.0, gl[0].Value)
testutil.AssertEqual(t, 3.0, gl[1].Value)
}