summaryrefslogtreecommitdiff
path: root/internal/comic/pageframe_test.go
blob: c9c7c26f3e5e2510c8ea84dd595a512107ae1179 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package comic

import "testing"

func TestDescribePageFrame(t *testing.T) {
	tests := []struct {
		ratio string
		want  string
	}{
		{"16:9", "landscape 16:9 format (widescreen)"},
		{"2:3", "portrait 2:3 format (tall comic book page proportions)"},
		{"3:2", "landscape 3:2 format (widescreen)"},
		{"1:1", "square 1:1 format"},
		{"", "landscape 16:9 format (widescreen)"},
		{"bogus", "bogus format"},
	}
	for _, tt := range tests {
		if got := DescribePageFrame(tt.ratio); got != tt.want {
			t.Fatalf("DescribePageFrame(%q) = %q, want %q", tt.ratio, got, tt.want)
		}
	}
}