Skip to content

Commit 89f69ba

Browse files
committed
Fix
1 parent cc210a2 commit 89f69ba

File tree

1 file changed

+7
-7
lines changed
  • src/test/java/com/thealgorithms/dynamicprogramming

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,47 @@ public class DPTest {
1010
void testSumLessThanMinimumFaceValue() {
1111
// When the sum is less than the minimum possible face value
1212
// There are 0 ways to achieve the sum
13-
assertEquals(0, DP.findWays(4, 2, 1)); // 4 faces, 2 dice, sum = 1
13+
assertEquals(0, DP.findWays(4, 2, 1)); // 4 faces, 2 dice, sum = 1
1414
}
1515

1616
@Test
1717
void testTwoDiceWithSumEqualToTwo() {
1818
// When there are 2 dice and the sum is equal to the number of dice
1919
// The only way is to have both dice showing 1
20-
assertEquals(1, DP.findWays(2, 2, 2)); // 2 faces, 2 dice, sum = 2
20+
assertEquals(1, DP.findWays(2, 2, 2)); // 2 faces, 2 dice, sum = 2
2121
}
2222

2323
@Test
2424
void testTwoDiceWithSumThree() {
2525
// When there are 2 dice and the sum is equal to 3
2626
// Possible combinations are (1,2) and (2,1)
27-
assertEquals(2, DP.findWays(2, 2, 3)); // 2 faces, 2 dice, sum = 3
27+
assertEquals(2, DP.findWays(2, 2, 3)); // 2 faces, 2 dice, sum = 3
2828
}
2929

3030
@Test
3131
void testThreeDiceWithSumEight() {
3232
// Test for 3 dice, each having 6 faces
3333
// Possible combinations to make sum of 8
34-
assertEquals(21, DP.findWays(6, 3, 8)); // 6 faces, 3 dice, sum = 8
34+
assertEquals(21, DP.findWays(6, 3, 8)); // 6 faces, 3 dice, sum = 8
3535
}
3636

3737
@Test
3838
void testTwoDiceWithSumFive() {
3939
// Test for 2 dice, with 4 faces to make sum of 5
4040
// Possible combinations: (1,4), (2,3), (3,2), (4,1)
41-
assertEquals(4, DP.findWays(4, 2, 5)); // 4 faces, 2 dice, sum = 5
41+
assertEquals(4, DP.findWays(4, 2, 5)); // 4 faces, 2 dice, sum = 5
4242
}
4343

4444
@Test
4545
void testThreeDiceWithSumFive() {
4646
// Test for 3 dice, with 4 faces to make sum of 5
4747
// Possible combinations: (1,1,3), (1,2,2), (1,3,1), (2,1,2), (2,2,1), (3,1,1)
48-
assertEquals(6, DP.findWays(4, 3, 5)); // 4 faces, 3 dice, sum = 5
48+
assertEquals(6, DP.findWays(4, 3, 5)); // 4 faces, 3 dice, sum = 5
4949
}
5050

5151
@Test
5252
void testEdgeCaseZeroSum() {
5353
// Test for 0 sum with 0 dice
54-
assertEquals(0, DP.findWays(4, 0, 0)); // 4 faces, 0 dice, sum = 0
54+
assertEquals(0, DP.findWays(4, 0, 0)); // 4 faces, 0 dice, sum = 0
5555
}
5656
}

0 commit comments

Comments
 (0)