1
0
mirror of https://github.com/maaslalani/gambit.git synced 2024-11-28 08:38:36 +02:00
gambit/border/border_test.go
Ayman Bagabas 466490be7e fix: flipped board order
Fixes: 87dfad59be ("feat: ability to flip board")
2022-02-08 17:23:42 -05:00

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)
}
}
}