Skip to content

Commit e4ea563

Browse files
committed
Remove trailing spaces and ensure newline at EOF
1 parent 35be17e commit e4ea563

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/com/thealgorithms/recursion/Factorial.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private Factorial() {
2020
* @return factorial of n
2121
* @throws IllegalArgumentException if n is negative
2222
*/
23-
23+
2424
public static long factorial(int n) {
2525
if (n < 0) {
2626
throw new IllegalArgumentException("Factorial is not defined for negative numbers.");

src/test/java/com/thealgorithms/recursion/FactorialTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@ public class FactorialTest {
1010
public void testFactorialOfZero() {
1111
assertEquals(1, Factorial.factorial(0));
1212
}
13-
13+
1414
@Test
1515
public void testFactorialOfOne() {
1616
assertEquals(1, Factorial.factorial(1));
1717
}
18-
18+
1919
@Test
2020
public void testFactorialOfPositiveNumbers() {
2121
assertEquals(120, Factorial.factorial(5));
2222
assertEquals(720, Factorial.factorial(6));
2323
assertEquals(5040, Factorial.factorial(7));
2424
}
25-
25+
2626
@Test
2727
public void testFactorialOfTen() {
2828
assertEquals(3628800, Factorial.factorial(10));
2929
}
30-
30+
3131
@Test
3232
public void testNegativeNumberThrowsException() {
3333
assertThrows(IllegalArgumentException.class, () -> Factorial.factorial(-1));

0 commit comments

Comments
 (0)