File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/test/java/g0701_0800/s0707_design_linked_list Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 7
7
8
8
class MyLinkedListTest {
9
9
@ Test
10
- void myLinkedListTest () {
10
+ void myLinkedList () {
11
11
MyLinkedList myLinkedList = new MyLinkedList ();
12
12
myLinkedList .addAtHead (1 );
13
13
myLinkedList .addAtTail (3 );
@@ -16,4 +16,15 @@ void myLinkedListTest() {
16
16
myLinkedList .deleteAtIndex (1 );
17
17
assertThat (myLinkedList .get (1 ), equalTo (3 ));
18
18
}
19
+
20
+ @ Test
21
+ void myLinkedList2 () {
22
+ MyLinkedList myLinkedList = new MyLinkedList ();
23
+ myLinkedList .addAtHead (1 );
24
+ myLinkedList .addAtTail (3 );
25
+ myLinkedList .addAtIndex (1 , 2 );
26
+ assertThat (myLinkedList .get (1 ), equalTo (2 ));
27
+ myLinkedList .deleteAtIndex (0 );
28
+ assertThat (myLinkedList .get (0 ), equalTo (2 ));
29
+ }
19
30
}
You can’t perform that action at this time.
0 commit comments