mirror of
https://github.com/mum4k/termdash.git
synced 2025-04-27 13:48:49 +08:00
Improving test coverage.
This commit is contained in:
parent
50a734d77a
commit
045bd3ffd1
@ -67,6 +67,16 @@ func TestBrailleCircle(t *testing.T) {
|
||||
radius: 2,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
desc: "fails when clearing a circle that doesn't fit",
|
||||
canvas: image.Rect(0, 0, 1, 1),
|
||||
mid: image.Point{0, 0},
|
||||
radius: 2,
|
||||
opts: []BrailleCircleOption{
|
||||
BrailleCircleClearPixels(),
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
desc: "fails when the filled circle doesn't fit",
|
||||
canvas: image.Rect(0, 0, 1, 1),
|
||||
|
@ -81,6 +81,16 @@ func TestBrailleLine(t *testing.T) {
|
||||
end: image.Point{6, 3},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
desc: "low line, fails on end point outside of the canvas when clearing pixels",
|
||||
canvas: image.Rect(0, 0, 3, 1),
|
||||
start: image.Point{0, 0},
|
||||
end: image.Point{6, 3},
|
||||
opts: []BrailleLineOption{
|
||||
BrailleLineClearPixels(),
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
desc: "high line, fails on end point outside of the canvas",
|
||||
canvas: image.Rect(0, 0, 1, 1),
|
||||
|
Loading…
x
Reference in New Issue
Block a user