Commit 94ebd7ed authored by vicotor's avatar vicotor

add test

parent 4c57934f
package server
import (
"encoding/hex"
"fmt"
"github.com/docker/docker/libnetwork/bitmap"
"testing"
)
func TestNewNode(t *testing.T) {
data, _ := hex.DecodeString("000000003b9aca00000000003b9ac9c50001ffbe00000000000000017fff7ebf0000000000000001d7ffa0000000000000000001000000000000000001dcd64d")
b := bitmap.New(100000)
if err := b.UnmarshalBinary(data); err != nil {
fmt.Println("unmarshal failed")
}
xx := b.IsSet(57)
fmt.Println("xx is", xx)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment