Skip to content

Commit 822a694

Browse files
author
alxkm
committed
Fix test data format
1 parent 82b0ba1 commit 822a694

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

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

+6-27
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package com.thealgorithms.backtracking;
22

3-
import org.junit.jupiter.api.Test;
3+
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
import static org.junit.jupiter.api.Assertions.assertIterableEquals;
45

56
import java.util.ArrayList;
67
import java.util.List;
7-
import static org.junit.jupiter.api.Assertions.assertEquals;
8-
import static org.junit.jupiter.api.Assertions.assertIterableEquals;
8+
import org.junit.jupiter.api.Test;
99

1010
public class SubsequenceTest {
1111

@@ -18,43 +18,22 @@ void testNoElement() {
1818

1919
@Test
2020
void testLengthOfTwo() {
21-
List<List<Integer>> expected = List.of(
22-
List.of(),
23-
List.of(2),
24-
List.of(1),
25-
List.of(1, 2)
26-
);
21+
List<List<Integer>> expected = List.of(List.of(), List.of(2), List.of(1), List.of(1, 2));
2722
List<List<Object>> actual = Subsequence.generateAllSubsequences(List.of(1, 2));
2823
assertIterableEquals(expected, actual);
2924
}
3025

3126
@Test
3227
void testLengthOfThree() {
33-
List<List<String>> expected = List.of(
34-
List.of(),
35-
List.of("C"),
36-
List.of("B"),
37-
List.of("B", "C"),
38-
List.of("A"),
39-
List.of("A", "C"),
40-
List.of("A", "B"),
41-
List.of("A", "B", "C")
28+
List<List<String>> expected = List.of(List.of(), List.of("C"), List.of("B"), List.of("B", "C"), List.of("A"), List.of("A", "C"), List.of("A", "B"), List.of("A", "B", "C")
4229
);
4330
List<List<Object>> actual = Subsequence.generateAllSubsequences(List.of("A", "B", "C"));
4431
assertIterableEquals(expected, actual);
4532
}
4633

4734
@Test
4835
void testLengthOfThreeInteger() {
49-
List<List<Integer>> expected = List.of(
50-
List.of(),
51-
List.of(3),
52-
List.of(2),
53-
List.of(2, 3),
54-
List.of(1),
55-
List.of(1, 3),
56-
List.of(1, 2),
57-
List.of(1, 2, 3)
36+
List<List<Integer>> expected = List.of(List.of(), List.of(3), List.of(2), List.of(2, 3), List.of(1), List.of(1, 3), List.of(1, 2), List.of(1, 2, 3)
5837
);
5938
List<List<Object>> actual = Subsequence.generateAllSubsequences(List.of(1, 2, 3));
6039
assertIterableEquals(expected, actual);

0 commit comments

Comments
 (0)