mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Added more tests for ip2hex
This commit is contained in:
@@ -643,6 +643,14 @@ func TestHexConvertor(t *testing.T) {
|
||||
} else if !reflect.DeepEqual(expected, rpl) {
|
||||
t.Errorf("expecting: %+v, received: %+v", expected, rpl)
|
||||
}
|
||||
|
||||
val = "62.87.114.244"
|
||||
expected = "0x3e5772f4"
|
||||
if rpl, err := hx.Convert(val); err != nil {
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(expected, rpl) {
|
||||
t.Errorf("expecting: %+v, received: %+v", expected, rpl)
|
||||
}
|
||||
}
|
||||
|
||||
type testMockConverter struct{}
|
||||
|
||||
Reference in New Issue
Block a user