File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
test/dataStructures/linkedList Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 3
3
import org .junit .Assert ;
4
4
import org .junit .Test ;
5
5
import src .dataStructures .linkedList .LinkedList ;
6
+ import src .dataStructures .linkedList .LinkedList .Node ;
6
7
7
8
public class LinkedListTest {
8
9
@ Test
@@ -35,12 +36,18 @@ public void testSearchAndGet() {
35
36
ll .insert (7 , 6 );
36
37
ll .insert (6 , 6 );
37
38
38
- Integer test1 = ll .search (4 );
39
+ Node < Integer > test1 = ll .get (4 );
39
40
Assert .assertEquals ("4" , test1 .toString ());
40
41
41
- Integer test2 = ll .search (3 );
42
+ Node < Integer > test2 = ll .get (3 );
42
43
Assert .assertEquals ("3" , test2 .toString ());
43
44
45
+ Integer test3 = ll .search (4 );
46
+ Assert .assertEquals ("4" , test3 .toString ());
47
+
48
+ Integer test4 = ll .search (3 );
49
+ Assert .assertEquals ("3" , test4 .toString ());
50
+
44
51
Assert .assertEquals ("0 1 2 3 4 5 6 7 " , ll .toString ());
45
52
}
46
53
You can’t perform that action at this time.
0 commit comments