From ea4bf0a1d3cbf6387e028a200dc0cb317f5defcf Mon Sep 17 00:00:00 2001 From: Travis Date: Sat, 29 Apr 2017 17:58:46 -0500 Subject: [PATCH 1/2] Fix roaring test: TestBitmap_Quick_Array1 When the random number generator was coming up 0, then `a = []uint64{}`. This caused the bitmap `bm` to be empty. In this case, `bm.Slice()` is a nil slice, while the expected slice is an empty slice (i.e. they are not considered equal): got: ([]uint64) exp: ([]uint64) {} --- roaring/roaring_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roaring/roaring_test.go b/roaring/roaring_test.go index ea9c0d293..d28e72354 100644 --- a/roaring/roaring_test.go +++ b/roaring/roaring_test.go @@ -211,7 +211,10 @@ func testBitmapQuick(t *testing.T, n int, min, max uint64) { } // Verify slices are equal. - if got, exp := bm.Slice(), uint64SetSlice(m); !reflect.DeepEqual(got, exp) { + // If `got` is nil and `exp` has zero length, don't perform the DeepEqual + // because when `a` is empty (`a = []uint64{}`) then `got` is a nil slice + // while `exp` is an empty slice. Therefore they will not be considered equal. + if got, exp := bm.Slice(), uint64SetSlice(m); !(got == nil && len(exp) == 0) && !reflect.DeepEqual(got, exp) { t.Fatalf("unexpected values:\n\ngot=%+v\n\nexp=%+v\n\n", got, exp) } From edc8f0004f39185cea87b3eeb919cd6064e91d2a Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Mon, 1 May 2017 14:04:36 -0500 Subject: [PATCH 2/2] Fix typo in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 377ea62aa..9dcf580bd 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ There are supported libraries for the following languages: ## Get Support -There are [several channels](https://www.pilosa.com/community/#support) availble for you to reach out to us for support. +There are [several channels](https://www.pilosa.com/community/#support) available for you to reach out to us for support. ## Contributing