|
9 | 9 |
|
10 | 10 | public class _82Test {
|
11 | 11 |
|
12 |
| - private static _82.Solution1 solution1; |
13 |
| - private static ListNode head; |
14 |
| - private static ListNode expected; |
| 12 | + private static _82.Solution1 solution1; |
| 13 | + private static ListNode head; |
| 14 | + private static ListNode expected; |
15 | 15 |
|
16 |
| - @BeforeClass |
17 |
| - public static void setup() { |
18 |
| - solution1 = new _82.Solution1(); |
19 |
| - } |
| 16 | + @BeforeClass |
| 17 | + public static void setup() { |
| 18 | + solution1 = new _82.Solution1(); |
| 19 | + } |
20 | 20 |
|
21 |
| - @Test |
22 |
| - public void test1() { |
23 |
| - head = LinkedListUtils.contructLinkedList(new int[] {1, 2, 3, 3, 4, 4, 5}); |
24 |
| - expected = LinkedListUtils.contructLinkedList(new int[] {1, 2, 5}); |
25 |
| - Assert.assertEquals(expected, solution1.deleteDuplicates(head)); |
26 |
| - } |
| 21 | + @Test |
| 22 | + public void test1() { |
| 23 | + head = LinkedListUtils.contructLinkedList(new int[]{1, 2, 3, 3, 4, 4, 5}); |
| 24 | + expected = LinkedListUtils.contructLinkedList(new int[]{1, 2, 5}); |
| 25 | + Assert.assertEquals(expected, solution1.deleteDuplicates(head)); |
| 26 | + } |
27 | 27 |
|
28 |
| - @Test |
29 |
| - public void test2() { |
30 |
| - head = LinkedListUtils.contructLinkedList(new int[] {1, 1, 1, 2, 3}); |
31 |
| - expected = LinkedListUtils.contructLinkedList(new int[] {2, 3}); |
32 |
| - Assert.assertEquals(expected, solution1.deleteDuplicates(head)); |
33 |
| - } |
| 28 | + @Test |
| 29 | + public void test2() { |
| 30 | + head = LinkedListUtils.contructLinkedList(new int[]{1, 1, 1, 2, 3}); |
| 31 | + expected = LinkedListUtils.contructLinkedList(new int[]{2, 3}); |
| 32 | + Assert.assertEquals(expected, solution1.deleteDuplicates(head)); |
| 33 | + } |
34 | 34 | }
|
0 commit comments