Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd7bc9a1

Browse files
add test for 21
1 parenta229b58 commitd7bc9a1

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
packagecom.fishercoder;
2+
3+
importcom.fishercoder.common.classes.ListNode;
4+
importcom.fishercoder.solutions._21;
5+
importorg.junit.BeforeClass;
6+
importorg.junit.Test;
7+
8+
importjava.util.Arrays;
9+
10+
importstaticorg.junit.Assert.assertEquals;
11+
12+
publicclass_21Test {
13+
privatestatic_21.Solution1solution1;
14+
privatestaticListNodel1;
15+
privatestaticListNodel2;
16+
17+
@BeforeClass
18+
publicstaticvoidsetup() {
19+
solution1 =new_21.Solution1();
20+
}
21+
22+
@Test
23+
publicvoidtest1() {
24+
l1 =ListNode.createSinglyLinkedList(Arrays.asList(1,3,5));
25+
l2 =ListNode.createSinglyLinkedList(Arrays.asList(2,4));
26+
assertEquals(ListNode.createSinglyLinkedList(Arrays.asList(1,2,3,4,5)),solution1.mergeTwoLists(l1,l2));
27+
}
28+
29+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp