Skip to content

Commit 275a087

Browse files
committed
Fix
1 parent 3a805f1 commit 275a087

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/test/java/com/thealgorithms/dynamicprogramming/FibonacciTest.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,9 @@ void testFibBinet() {
8181
@Test
8282
void testNegativeInput() {
8383
// Test negative input; Fibonacci is not defined for negative numbers
84-
assertThrows(IllegalArgumentException.class, () -> {
85-
Fibonacci.fibMemo(-1);
86-
});
87-
assertThrows(IllegalArgumentException.class, () -> {
88-
Fibonacci.fibBotUp(-1);
89-
});
90-
assertThrows(IllegalArgumentException.class, () -> {
91-
Fibonacci.fibOptimized(-1);
92-
});
93-
assertThrows(IllegalArgumentException.class, () -> {
94-
Fibonacci.fibBinet(-1);
95-
});
84+
assertThrows(IllegalArgumentException.class, () -> { Fibonacci.fibMemo(-1); });
85+
assertThrows(IllegalArgumentException.class, () -> { Fibonacci.fibBotUp(-1); });
86+
assertThrows(IllegalArgumentException.class, () -> { Fibonacci.fibOptimized(-1); });
87+
assertThrows(IllegalArgumentException.class, () -> { Fibonacci.fibBinet(-1); });
9688
}
9789
}

0 commit comments

Comments
 (0)