diff --git a/libnetwork/bitseq/sequence_test.go b/libnetwork/bitseq/sequence_test.go index 6ba671ce62..da16186452 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<