Added test for SliceStringToIface

This commit is contained in:
Tripon Alexandru-Ionut
2019-05-30 12:47:53 +03:00
committed by Dan Christian Bogos
parent d91c754389
commit f6260cbeeb

View File

@@ -54,3 +54,11 @@ func TestStripSlicePrefix(t *testing.T) {
t.Errorf("expecting: %+v, received: %+v", eSlc, retSlc)
}
}
func TestSliceStringToIface(t *testing.T) {
args := []string{"*default", "ToR", "*voice"}
exp := []interface{}{"*default", "ToR", "*voice"}
if rply := SliceStringToIface(args); !reflect.DeepEqual(exp, rply) {
t.Errorf("Expected: %s ,received: %s", ToJSON(exp), ToJSON(rply))
}
}