mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-09 19:32:24 +08:00
17 lines
218 B
Go
17 lines
218 B
Go
package blocks
|
|
|
|
import "testing"
|
|
|
|
func TestBlocksBasic(t *testing.T) {
|
|
|
|
// Test empty data
|
|
empty := []byte{}
|
|
NewBlock(empty)
|
|
|
|
// Test nil case
|
|
NewBlock(nil)
|
|
|
|
// Test some data
|
|
NewBlock([]byte("Hello world!"))
|
|
}
|