mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 11:27:50 +00:00
Corrected err and checked for err
This commit is contained in:
parent
18d86a204c
commit
7ff26194d8
1 changed files with 8 additions and 4 deletions
|
|
@ -3282,16 +3282,20 @@ func TestUnmarshalRoaringWithNoErrors(t *testing.T) {
|
|||
},
|
||||
}
|
||||
var testContainer []byte
|
||||
var err error
|
||||
for _, testCase := range testCases {
|
||||
if testCase.roaringFileName == "" {
|
||||
testContainer, _ = hex.DecodeString(testCase.roaringData)
|
||||
testContainer, err = hex.DecodeString(testCase.roaringData)
|
||||
if err != nil {
|
||||
t.Fatalf("hex decode %s", err)
|
||||
}
|
||||
} else {
|
||||
testContainer, _ = ioutil.ReadFile(testCase.roaringFileName)
|
||||
}
|
||||
bm := NewBitmap()
|
||||
er := bm.UnmarshalBinary(testContainer)
|
||||
if er != nil {
|
||||
t.Fatalf("UnmarshalOfficialRoaring %s", er)
|
||||
err = bm.UnmarshalBinary(testContainer)
|
||||
if err != nil {
|
||||
t.Fatalf("UnmarshalOfficialRoaring %s", err)
|
||||
}
|
||||
if bm.Count() != testCase.count {
|
||||
t.Fatalf("expecting %s got %d", testCase.expectedBits, bm.Count())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue