Skip to content

Commit

Permalink
Merge pull request #29 from mihirh19:dev-main
Browse files Browse the repository at this point in the history
test case for circular_linked_list added
  • Loading branch information
mihirh19 authored Sep 29, 2023
2 parents dcb53b4 + 5b83cba commit 5281349
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions DSA/data_structure/linked_list/test_circular_linked_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from . import circular_linked_list as cll

l1 = cll.CircularLinkedList()

def test_insert_head():
l1.insert_head(1)
assert l1.head.data == 1

def test_insert_tail():
l1.insert_tail(2)
assert l1.tail.data == 2

def test_insert_at_index():
l1.insert_at_index(1, 3)
assert l1.head.next.data == 3

0 comments on commit 5281349

Please sign in to comment.