Add rleplus

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera
2019-09-16 14:10:51 +02:00
parent 830295a6a4
commit 4107d701c1
5 changed files with 8 additions and 9 deletions
+2 -4
View File
@@ -3,14 +3,12 @@ package bitvector_test
import (
"testing"
"github.com/filecoin-project/go-filecoin/rleplus/internal"
tf "github.com/filecoin-project/go-filecoin/testhelpers/testflags"
"github.com/stretchr/testify/assert"
bitvector "github.com/filecoin-project/go-lotus/extern/rleplus/internal"
)
func TestBitVector(t *testing.T) {
tf.UnitTest(t)
t.Run("zero value", func(t *testing.T) {
var v bitvector.BitVector
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"fmt"
"sort"
"github.com/filecoin-project/go-filecoin/rleplus/internal"
bitvector "github.com/filecoin-project/go-lotus/extern/rleplus/internal"
)
// Version is the 2 lowest bits of this constant
+2 -4
View File
@@ -6,14 +6,12 @@ import (
"sort"
"testing"
"github.com/filecoin-project/go-filecoin/rleplus"
"github.com/filecoin-project/go-filecoin/rleplus/internal"
tf "github.com/filecoin-project/go-filecoin/testhelpers/testflags"
"github.com/filecoin-project/go-lotus/extern/rleplus"
bitvector "github.com/filecoin-project/go-lotus/extern/rleplus/internal"
"gotest.tools/assert"
)
func TestRleplus(t *testing.T) {
tf.UnitTest(t)
t.Run("Encode", func(t *testing.T) {
// Encode an intset