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

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

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

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

1
go.mod
View File

@ -81,6 +81,7 @@ require (
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
google.golang.org/api v0.9.0 // indirect
gopkg.in/urfave/cli.v2 v2.0.0-20180128182452-d3ae77c26ac8
gotest.tools v2.2.0+incompatible
launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect
)

2
go.sum
View File

@ -694,6 +694,8 @@ gopkg.in/urfave/cli.v2 v2.0.0-20180128182452-d3ae77c26ac8/go.mod h1:cKXr3E0k4aos
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=