Skip to content

Commit 961e476

Browse files
fishercoder1534zhahui
authored andcommitted
add test for 24
1 parent 82f6009 commit 961e476

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.common.classes.ListNode;
4+
import com.fishercoder.common.utils.CommonUtils;
5+
import com.fishercoder.solutions._24;
6+
import org.junit.BeforeClass;
7+
import org.junit.Test;
8+
9+
import java.util.Arrays;
10+
11+
public class _24Test {
12+
private static _24.Solution1 solution1;
13+
private static ListNode head;
14+
15+
@BeforeClass
16+
public static void setup() {
17+
solution1 = new _24.Solution1();
18+
}
19+
20+
@Test
21+
public void test1() {
22+
head = ListNode.createSinglyLinkedList(Arrays.asList(1, 2, 3, 4));
23+
CommonUtils.printList(solution1.swapPairs(head));
24+
}
25+
26+
}

0 commit comments

Comments
 (0)