Revised WithErrors test with err corrections

This commit is contained in:
Ashley Svetlik 2019-06-24 12:22:51 -05:00
parent 6b6249b86a
commit b0165d7ef9

View file

@ -3322,12 +3322,15 @@ func TestUnmarshalRoaringWithErrors(t *testing.T) {
},
}
for _, loopContainers := range noContainers {
zeroContainers, _ := hex.DecodeString(loopContainers.hexString)
zeroContainers, err := hex.DecodeString(loopContainers.hexString)
if err != nil {
t.Fatalf("hex decode %s", err)
}
bm := NewBitmap()
er := bm.UnmarshalBinary(zeroContainers)
if er != nil {
if er.Error() != loopContainers.expectedError {
t.Fatalf("Expected: %s, Got: %s", loopContainers.expectedError, er)
err = bm.UnmarshalBinary(zeroContainers)
if err != nil {
if err.Error() != loopContainers.expectedError {
t.Fatalf("Expected: %s, Got: %s", loopContainers.expectedError, err)
}
}
}