test: fix test

This commit is contained in:
vicanso 2022-06-18 10:49:39 +08:00
parent d3c6649cd9
commit 29c9281d7c
2 changed files with 4 additions and 1 deletions

View file

@ -39,6 +39,7 @@ func TestPainterOption(t *testing.T) {
d, err := NewPainter(PainterOptions{
Width: 800,
Height: 600,
Type: ChartOutputSVG,
},
PainterBoxOption(Box{
Right: 400,
@ -329,6 +330,7 @@ func TestPainter(t *testing.T) {
d, err := NewPainter(PainterOptions{
Width: 400,
Height: 300,
Type: ChartOutputSVG,
}, PainterPaddingOption(chart.Box{
Left: 5,
Top: 10,
@ -346,6 +348,7 @@ func TestPainterTextFit(t *testing.T) {
p, err := NewPainter(PainterOptions{
Width: 400,
Height: 300,
Type: ChartOutputSVG,
})
assert.Nil(err)
f, _ := chart.GetDefaultFont()

View file

@ -99,7 +99,7 @@ func TestMeasureTextMaxWidthHeight(t *testing.T) {
"Sat",
"Sun",
}, p)
assert.Equal(26, maxWidth)
assert.Equal(31, maxWidth)
assert.Equal(12, maxHeight)
}