test: fix test
This commit is contained in:
parent
d3c6649cd9
commit
29c9281d7c
2 changed files with 4 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ func TestMeasureTextMaxWidthHeight(t *testing.T) {
|
|||
"Sat",
|
||||
"Sun",
|
||||
}, p)
|
||||
assert.Equal(26, maxWidth)
|
||||
assert.Equal(31, maxWidth)
|
||||
assert.Equal(12, maxHeight)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue