go-chart/grid_line_test.go
Zeni Kim cc8d36edd9
Some checks failed
Continuous Integration / Tests (push) Has been cancelled
update url
2024-10-27 21:52:38 -05:00

24 lines
478 B
Go

package chart
import (
"testing"
"git.smarteching.com/zeni/go-chart/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)
}