diff options
Diffstat (limited to 'content/cover/pkg_test.go')
-rw-r--r-- | content/cover/pkg_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/content/cover/pkg_test.go b/content/cover/pkg_test.go new file mode 100644 index 0000000..8bf4b0c --- /dev/null +++ b/content/cover/pkg_test.go @@ -0,0 +1,22 @@ +package size + +import "testing" + +type Test struct { + in int + out string +} + +var tests = []Test{ + {-1, "negative"}, + {5, "small"}, +} + +func TestSize(t *testing.T) { + for i, test := range tests { + size := Size(test.in) + if size != test.out { + t.Errorf("#%d: Size(%d)=%s; want %s", i, test.in, size, test.out) + } + } +} |