From 8a1f8659fa0d07202b6596fd15812b1019f4520f Mon Sep 17 00:00:00 2001 From: Travis Turner Date: Tue, 4 Sep 2018 10:35:47 -0500 Subject: [PATCH] change test to use exported UnmarshalStandardRoaring() --- api.go | 1 + roaring/roaring_internal_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/api.go b/api.go index 2947bbae0..77ce4d0a0 100644 --- a/api.go +++ b/api.go @@ -1,3 +1,4 @@ +// Copyright 2017 Pilosa Corp. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/roaring/roaring_internal_test.go b/roaring/roaring_internal_test.go index e883a6684..581a8040f 100644 --- a/roaring/roaring_internal_test.go +++ b/roaring/roaring_internal_test.go @@ -3231,27 +3231,27 @@ func runContainerFunc(f interface{}, c ...*Container) *Container { func TestUnmarshalStdRoaring(t *testing.T) { //generated serialize image from java(clojure) with arrays _2arrayContainer, _ := hex.DecodeString("3A300000020000000000020001000000180000001E0000000100020003000100") - bm, er := unmarshalStandardRoaring(_2arrayContainer) + bm, er := UnmarshalStandardRoaring(_2arrayContainer) if er != nil { - t.Fatalf("unmarshalStandardRoaring %s", er) + t.Fatalf("UnmarshalStandardRoaring %s", er) } if bm.Count() != 4 { t.Fatalf("unexpected bitmap %v expected bits [1 2 3 65537]", bm.Slice()) } //generated serialize image from java(clojure) with a run and array _rle_array_container, _ := hex.DecodeString("3B3001000100000900010000000100010009000100") - bm, er = unmarshalStandardRoaring(_rle_array_container) + bm, er = UnmarshalStandardRoaring(_rle_array_container) if er != nil { - t.Fatalf("unmarshalStandardRoaring %s", er) + t.Fatalf("UnmarshalStandardRoaring %s", er) } if bm.Count() != 11 { t.Fatalf("unexpected bitmap %v expected bits [1 2 3 4 5 6 7 8 9 10 65537]", bm.Slice()) } //had to use an external file because emacs was barfing on the long line :() _bitmap_array_container, _ := ioutil.ReadFile("./bitmapcontainer.roaringbitmap") - bm, er = unmarshalStandardRoaring(_bitmap_array_container) + bm, er = UnmarshalStandardRoaring(_bitmap_array_container) if er != nil { - t.Fatalf("unmarshalStandardRoaring %s", er) + t.Fatalf("UnmarshalStandardRoaring %s", er) } if bm.Count() != 10000 { t.Fatalf("expecting X got %d", bm.Count())