package file import ( "bytes" "testing" ) func TestSig(t *testing.T) { b := &Block{ Comment: "comment", Bytes: []byte{'t', 'e', 's', 't'}, } b2, err := Decode(EncodeToMemory(b)) if err != nil { t.Error(err) } if b.Comment != b2.Comment || !bytes.Equal(b.Bytes, b2.Bytes) { t.Errorf("got %v, want %v", b2, b) } }