mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Modify PrefixSliceItems test to account for empty elements
This commit is contained in:
committed by
Dan Christian Bogos
parent
28d4b755bf
commit
113f945c57
@@ -60,9 +60,9 @@ func TestHasPrefixSlice(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPrefixSliceItems(t *testing.T) {
|
||||
rcv := PrefixSliceItems("*", []string{"1", "2", "3", "4", "5"})
|
||||
rcv := PrefixSliceItems("*", []string{"1", "2", "3", "", "5"})
|
||||
sort.Strings(rcv)
|
||||
eOut := []string{"*1", "*2", "*3", "*4", "*5"}
|
||||
eOut := []string{"*1", "*2", "*3", "*5"}
|
||||
if !reflect.DeepEqual(eOut, rcv) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eOut, rcv)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user