refactor: change project structure and package name
This commit is contained in:
parent
c1468e8ae4
commit
ad10e9a062
163 changed files with 104 additions and 135 deletions
24
pkg/chart/grid_line_test.go
Normal file
24
pkg/chart/grid_line_test.go
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue