mirror of
https://github.com/maaslalani/gambit.git
synced 2024-11-28 08:38:36 +02:00
466490be7e
Fixes: 87dfad59be
("feat: ability to flip board")
36 lines
744 B
Go
36 lines
744 B
Go
package border_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/maaslalani/gambit/border"
|
|
)
|
|
|
|
func TestTopBorder(t *testing.T) {
|
|
tests := []struct {
|
|
borderFunc func() string
|
|
want string
|
|
}{
|
|
|
|
{
|
|
border.Top,
|
|
" ┌───┬───┬───┬───┬───┬───┬───┬───┐\n",
|
|
},
|
|
{
|
|
border.Middle,
|
|
" ├───┼───┼───┼───┼───┼───┼───┼───┤\n",
|
|
},
|
|
{
|
|
border.Bottom,
|
|
" └───┴───┴───┴───┴───┴───┴───┴───┘\n",
|
|
},
|
|
}
|
|
|
|
for _, test := range tests {
|
|
got := test.borderFunc()
|
|
if got != test.want {
|
|
t.Errorf("want %s, got %s", test.want, got)
|
|
}
|
|
}
|
|
}
|