Skip to content

Commit 571ed90

Browse files
samuelfacvil02
andauthored
Update src/test/java/com/thealgorithms/backtracking/CombinationTest.java
Co-authored-by: Piotr Idzik <[email protected]>
1 parent cb851ab commit 571ed90

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/test/java/com/thealgorithms/backtracking/CombinationTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ void testLengthOne() {
2424
@Test
2525
void testLengthTwo() {
2626
List<TreeSet<Integer>> result = Combination.combination(new Integer[] {1, 2}, 2);
27-
assert result != null;
28-
Integer[] arr = result.getFirst().toArray(new Integer[2]);
29-
assertEquals(1, (int) arr[0]);
30-
assertEquals(2, (int) arr[1]);
27+
assertEquals(Arrays.asList(new TreeSet<>(Arrays.asList(1, 2))), result);
3128
}
3229
}

0 commit comments

Comments
 (0)