Skip to content

Commit 75af89e

Browse files
committed
test: drop null input case flagged by Infer
Infer reports NULLPTR_DEREFERENCE for passing null to luhnCheck on purpose. The method does not document null handling, so the case is removed.
1 parent 17af7a3 commit 75af89e

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

‎src/test/java/com/thealgorithms/others/LuhnTest.java‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
44
import static org.junit.jupiter.api.Assertions.assertFalse;
5-
import static org.junit.jupiter.api.Assertions.assertThrows;
65
import static org.junit.jupiter.api.Assertions.assertTrue;
76

87
import org.junit.jupiter.api.Test;
@@ -103,9 +102,4 @@ void testInputArrayIsNotModified() {
103102
Luhn.luhnCheck(digits);
104103
assertArrayEquals(copy, digits);
105104
}
106-
107-
@Test
108-
void testNullInputThrowsNullPointerException() {
109-
assertThrows(NullPointerException.class, () -> Luhn.luhnCheck(null));
110-
}
111105
}

0 commit comments

Comments
 (0)