number tests

This commit is contained in:
Aneurin Barker Snook
2023-10-08 16:20:21 +01:00
parent 7cb1900ec1
commit 1cb434327a
6 changed files with 51 additions and 43 deletions
+4 -4
View File
@@ -16,8 +16,8 @@ func TestMaxLength(t *testing.T) {
{Input: "abcdefghi", L: 8, Err: ErrTooManyChars},
}
for _, tc := range testCases {
t.Logf("Testing %q against maximum length of %d", tc.Input, tc.L)
for n, tc := range testCases {
t.Logf("(%d) Testing %q against maximum length of %d", n, tc.Input, tc.L)
f := MaxLength(tc.L)
err := f(tc.Input)
@@ -42,8 +42,8 @@ func TestMinLength(t *testing.T) {
{Input: "abcdefghi", L: 8},
}
for _, tc := range testCases {
t.Logf("Testing %q against minimum length of %d", tc.Input, tc.L)
for n, tc := range testCases {
t.Logf("(%d) Testing %q against minimum length of %d", n, tc.Input, tc.L)
f := MinLength(tc.L)
err := f(tc.Input)