Skip to content

Commit d6222db

Browse files
Add test cases for strings ending with non-letter to fix patch coverage
1 parent 7c1940e commit d6222db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/com/thealgorithms/strings/AlphabeticalTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public class AlphabeticalTest {
2020
"'abcxyz', true",
2121
"'', false",
2222
"'1', false",
23-
"'abc!', false", // <--- string ending with non-letter
24-
"'ABc1', false" // <--- another example
23+
"'abc!', false", // <-- missing coverage
24+
"'ABc1', false" // <-- optional extra
2525
})
2626
void testIsAlphabetical(String input, boolean expected) {
2727
assertEquals(expected, Alphabetical.isAlphabetical(input));

0 commit comments

Comments
 (0)