forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_160Test.java
37 lines (31 loc) · 1.17 KB
/
_160Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.fishercoder;
import com.fishercoder.common.classes.ListNode;
import com.fishercoder.solutions._160;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class _160Test {
private static _160.Solution1 solution1;
private static _160.Solution2 solution2;
private static _160.Solution3 solution3;
private static ListNode headA;
private static ListNode headB;
private static ListNode expected;
@BeforeClass
public static void setup(){
solution1 = new _160.Solution1();
solution2 = new _160.Solution2();
solution3 = new _160.Solution3();
}
@Test
public void test1(){
headA = new ListNode(3);
headB = new ListNode(2);
headB.next = new ListNode(3);
expected = new ListNode(3);
/**TODO: both solution1 and solution2 are ACCEPTED on OJ, but somehow it's not passing in this unit test.*/
// assertEquals(expected, solution1.getIntersectionNode(headA, headB));
// assertEquals(expected, solution2.getIntersectionNode(headA, headB));
assertEquals(expected, solution3.getIntersectionNode(headA, headB));
}
}