1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-30 16:01:06 +08:00

refactoring unixfs node and importer/helpers to match

This commit is contained in:
Jeromy
2015-03-06 11:20:11 -08:00
parent f17521b76f
commit 0e9772c57e
4 changed files with 105 additions and 28 deletions

View File

@ -7,15 +7,16 @@ import (
pb "github.com/jbenet/go-ipfs/unixfs/pb"
)
func TestMultiBlock(t *testing.T) {
mbf := new(MultiBlock)
func TestFSNode(t *testing.T) {
fsn := new(FSNode)
fsn.Type = TFile
for i := 0; i < 15; i++ {
mbf.AddBlockSize(100)
fsn.AddBlockSize(100)
}
mbf.Data = make([]byte, 128)
fsn.Data = make([]byte, 128)
b, err := mbf.GetBytes()
b, err := fsn.GetBytes()
if err != nil {
t.Fatal(err)
}