diff --git a/libnetwork/bitseq/sequence_test.go b/libnetwork/bitseq/sequence_test.go index 6ba671ce62019672aa3f50a71e55a9c9644b6640..da16186452ea5ac1b676703c8b9e4290e98dca28 100644 --- a/libnetwork/bitseq/sequence_test.go +++ b/libnetwork/bitseq/sequence_test.go @@ -1359,3 +1359,67 @@ func TestGetFirstAvailableFromCurrent(t *testing.T) { } } } + +func TestMarshalJSON(t *testing.T) { + const expectedID = "my-bitseq" + expected := []byte("hello libnetwork") + hnd, err := NewHandle("", nil, expectedID, uint64(len(expected)*8)) + if err != nil { + t.Fatal(err) + } + + for i, c := range expected { + for j := 0; j < 8; j++ { + if c&(1<