test: fix test

This commit is contained in:
vicanso 2022-02-12 13:01:37 +08:00
parent bff06b2aa5
commit 1c89ed29be
6 changed files with 152 additions and 53 deletions

View file

@ -30,6 +30,22 @@ import (
"github.com/wcharczuk/go-chart/v2/drawing"
)
func TestNewLegendOption(t *testing.T) {
assert := assert.New(t)
opt := NewLegendOption([]string{
"a",
"b",
}, PositionRight)
assert.Equal(LegendOption{
Data: []string{
"a",
"b",
},
Left: PositionRight,
}, opt)
}
func TestLegendRender(t *testing.T) {
assert := assert.New(t)