diff options
Diffstat (limited to 'internal/comic/pageframe_test.go')
| -rw-r--r-- | internal/comic/pageframe_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/comic/pageframe_test.go b/internal/comic/pageframe_test.go new file mode 100644 index 0000000..c9c7c26 --- /dev/null +++ b/internal/comic/pageframe_test.go @@ -0,0 +1,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) + } + } +} |
