packagebitswapimport("testing""time"u"github.com/jbenet/go-ipfs/util"testutil"github.com/jbenet/go-ipfs/util/testutil")funcTestBlockReturnsErr(t*testing.T){off:=NewOfflineExchange()_,err:=off.Block(u.Key("foo"),time.Second)iferr!=nil{return// as desired}t.Fail()}funcTestHasBlockReturnsNil(t*testing.T){off:=NewOfflineExchange()block:=testutil.NewBlockOrFail(t,"data")err:=off.HasBlock(block)iferr!=nil{t.Fatal("")}}