mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Added more tests to the utils package
This commit is contained in:
committed by
Dan Christian Bogos
parent
e4c4b3a680
commit
f2ecda83e4
@@ -298,6 +298,21 @@ func TestPathItemListInsertBefore(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestPathItemListInsertBeforeNil(t *testing.T) {
|
||||
list1 := NewPathItemList()
|
||||
list2 := NewPathItemList()
|
||||
var received *PathItemElement
|
||||
node1 := NewPathItems([]string{"path1"})
|
||||
node2 := NewPathItems([]string{"path2"})
|
||||
list1.PushBack(node1)
|
||||
list2.PushBack(node2)
|
||||
received = list1.InsertBefore(PathItems{{Field: "path4"}}, list2.Back())
|
||||
if received != nil {
|
||||
t.Errorf("Expecting: <%+v>, received: <%+v>", nil, received)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestPathItemListInsertAfter(t *testing.T) {
|
||||
list := NewPathItemList()
|
||||
node1 := NewPathItems([]string{"path1"})
|
||||
|
||||
Reference in New Issue
Block a user