// Code generated by xtgen; DO NOT EDIT. package xproto import "testing" import "bnema.dev/xturbo/internal/xtest" func FuzzParseGetWindowAttributesReply(f *testing.F) { f.Add(make([]byte, 44)) if raw, err := xtest.LoadHex("../testdata/golden/xproto/GetWindowAttributes.reply.hex"); err != nil { f.Fatal(err) } else { f.Add(raw) } f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetWindowAttributesReply(raw) if !ok { if len(raw) >= 44 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.BackingStore() _ = r.Visual() _ = r.Class() _ = r.BitGravity() _ = r.WinGravity() _ = r.BackingPlanes() _ = r.BackingPixel() _ = r.SaveUnder() _ = r.MapIsInstalled() _ = r.MapState() _ = r.OverrideRedirect() _ = r.Colormap() _ = r.AllEventMasks() _ = r.YourEventMask() _ = r.DoNotPropagateMask() }) } func FuzzParseGetGeometryReply(f *testing.F) { f.Add(make([]byte, 32)) if raw, err := xtest.LoadHex("../testdata/golden/xproto/GetGeometry.reply.hex"); err != nil { f.Fatal(err) } else { f.Add(raw) } f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetGeometryReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Depth() _ = r.Root() _ = r.X() _ = r.Y() _ = r.Width() _ = r.Height() _ = r.BorderWidth() }) } func FuzzParseQueryTreeReply(f *testing.F) { f.Add(make([]byte, 32)) if raw, err := xtest.LoadHex("../testdata/golden/xproto/QueryTree.reply.hex"); err != nil { f.Fatal(err) } else { f.Add(raw) } f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseQueryTreeReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Root() _ = r.Parent() _ = r.ChildrenLen() { l0 := r.Children() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) } func FuzzParseInternAtomReply(f *testing.F) { f.Add(make([]byte, 32)) if raw, err := xtest.LoadHex("../testdata/golden/xproto/InternAtom.reply.hex"); err != nil { f.Fatal(err) } else { f.Add(raw) } f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseInternAtomReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Atom() }) } func FuzzParseGetAtomNameReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetAtomNameReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.NameLen() _ = len(r.Name()) }) } func FuzzParseGetPropertyReply(f *testing.F) { f.Add(make([]byte, 32)) if raw, err := xtest.LoadHex("../testdata/golden/xproto/GetProperty.reply.hex"); err != nil { f.Fatal(err) } else { f.Add(raw) } if raw, err := xtest.LoadHex("../testdata/golden/xproto/GetPropertyEmpty.reply.hex"); err != nil { f.Fatal(err) } else { f.Add(raw) } f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetPropertyReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Format() _ = r.Type() _ = r.BytesAfter() _ = r.ValueLen() _ = len(r.Value()) }) } func FuzzParseListPropertiesReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseListPropertiesReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.AtomsLen() { l0 := r.Atoms() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) } func FuzzParseGetSelectionOwnerReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetSelectionOwnerReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Owner() }) } func FuzzParseGrabPointerReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGrabPointerReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Status() }) } func FuzzParseGrabKeyboardReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGrabKeyboardReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Status() }) } func FuzzParseQueryPointerReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseQueryPointerReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.SameScreen() _ = r.Root() _ = r.Child() _ = r.RootX() _ = r.RootY() _ = r.WinX() _ = r.WinY() _ = r.Mask() }) } func FuzzParseGetMotionEventsReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetMotionEventsReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.EventsLen() { l0 := r.Events() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) } func FuzzParseTranslateCoordinatesReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseTranslateCoordinatesReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.SameScreen() _ = r.Child() _ = r.DstX() _ = r.DstY() }) } func FuzzParseGetInputFocusReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetInputFocusReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.RevertTo() _ = r.Focus() }) } func FuzzParseQueryKeymapReply(f *testing.F) { f.Add(make([]byte, 40)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseQueryKeymapReply(raw) if !ok { if len(raw) >= 40 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = len(r.Keys()) }) } func FuzzParseQueryFontReply(f *testing.F) { f.Add(make([]byte, 60)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseQueryFontReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.MinBounds() _ = r.MaxBounds() _ = r.MinCharOrByte2() _ = r.MaxCharOrByte2() _ = r.DefaultChar() _ = r.PropertiesLen() _ = r.DrawDirection() _ = r.MinByte1() _ = r.MaxByte1() _ = r.AllCharsExist() _ = r.FontAscent() _ = r.FontDescent() _ = r.CharInfosLen() { l0 := r.Properties() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } { l0 := r.CharInfos() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) } func FuzzParseQueryTextExtentsReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseQueryTextExtentsReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.DrawDirection() _ = r.FontAscent() _ = r.FontDescent() _ = r.OverallAscent() _ = r.OverallDescent() _ = r.OverallWidth() _ = r.OverallLeft() _ = r.OverallRight() }) } func FuzzParseListFontsReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseListFontsReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.NamesLen() { it0 := r.Names() for it0.Next() { _ = it0.Value().NameLen() _ = len(it0.Value().Name()) } if it0.Err() { t.Fatal("iterator error after successful Parse") } } }) } func FuzzParseListFontsWithInfoReply(f *testing.F) { f.Add(make([]byte, 60)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseListFontsWithInfoReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.NameLen() _ = r.MinBounds() _ = r.MaxBounds() _ = r.MinCharOrByte2() _ = r.MaxCharOrByte2() _ = r.DefaultChar() _ = r.PropertiesLen() _ = r.DrawDirection() _ = r.MinByte1() _ = r.MaxByte1() _ = r.AllCharsExist() _ = r.FontAscent() _ = r.FontDescent() _ = r.RepliesHint() { l0 := r.Properties() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } _ = len(r.Name()) }) } func FuzzParseGetFontPathReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetFontPathReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.PathLen() { it0 := r.Path() for it0.Next() { _ = it0.Value().NameLen() _ = len(it0.Value().Name()) } if it0.Err() { t.Fatal("iterator error after successful Parse") } } }) } func FuzzParseGetImageReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetImageReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Depth() _ = r.Visual() _ = len(r.Data()) }) } func FuzzParseListInstalledColormapsReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseListInstalledColormapsReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.CmapsLen() { l0 := r.Cmaps() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) } func FuzzParseAllocColorReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseAllocColorReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Red() _ = r.Green() _ = r.Blue() _ = r.Pixel() }) } func FuzzParseAllocNamedColorReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseAllocNamedColorReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Pixel() _ = r.ExactRed() _ = r.ExactGreen() _ = r.ExactBlue() _ = r.VisualRed() _ = r.VisualGreen() _ = r.VisualBlue() }) } func FuzzParseAllocColorCellsReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseAllocColorCellsReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.PixelsLen() _ = r.MasksLen() { l0 := r.Pixels() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } { l0 := r.Masks() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) } func FuzzParseAllocColorPlanesReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseAllocColorPlanesReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.PixelsLen() _ = r.RedMask() _ = r.GreenMask() _ = r.BlueMask() { l0 := r.Pixels() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) } func FuzzParseQueryColorsReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseQueryColorsReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.ColorsLen() { l0 := r.Colors() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) } func FuzzParseLookupColorReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseLookupColorReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.ExactRed() _ = r.ExactGreen() _ = r.ExactBlue() _ = r.VisualRed() _ = r.VisualGreen() _ = r.VisualBlue() }) } func FuzzParseQueryBestSizeReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseQueryBestSizeReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Width() _ = r.Height() }) } func FuzzParseQueryExtensionReply(f *testing.F) { f.Add(make([]byte, 32)) if raw, err := xtest.LoadHex("../testdata/golden/xproto/QueryExtension.reply.hex"); err != nil { f.Fatal(err) } else { f.Add(raw) } f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseQueryExtensionReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Present() _ = r.MajorOpcode() _ = r.FirstEvent() _ = r.FirstError() }) } func FuzzParseListExtensionsReply(f *testing.F) { f.Add(make([]byte, 32)) if raw, err := xtest.LoadHex("../testdata/golden/xproto/ListExtensions.reply.hex"); err != nil { f.Fatal(err) } else { f.Add(raw) } f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseListExtensionsReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.NamesLen() { it0 := r.Names() for it0.Next() { _ = it0.Value().NameLen() _ = len(it0.Value().Name()) } if it0.Err() { t.Fatal("iterator error after successful Parse") } } }) } func FuzzParseGetKeyboardMappingReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetKeyboardMappingReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.KeysymsPerKeycode() { l0 := r.Keysyms() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) } func FuzzParseGetKeyboardControlReply(f *testing.F) { f.Add(make([]byte, 52)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetKeyboardControlReply(raw) if !ok { if len(raw) >= 52 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.GlobalAutoRepeat() _ = r.LedMask() _ = r.KeyClickPercent() _ = r.BellPercent() _ = r.BellPitch() _ = r.BellDuration() _ = len(r.AutoRepeats()) }) } func FuzzParseGetPointerControlReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetPointerControlReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.AccelerationNumerator() _ = r.AccelerationDenominator() _ = r.Threshold() }) } func FuzzParseGetScreenSaverReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetScreenSaverReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Timeout() _ = r.Interval() _ = r.PreferBlanking() _ = r.AllowExposures() }) } func FuzzParseListHostsReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseListHostsReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Mode() _ = r.HostsLen() { it0 := r.Hosts() for it0.Next() { _ = it0.Value().Family() _ = it0.Value().AddressLen() _ = len(it0.Value().Address()) } if it0.Err() { t.Fatal("iterator error after successful Parse") } } }) } func FuzzParseSetPointerMappingReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseSetPointerMappingReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Status() }) } func FuzzParseGetPointerMappingReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetPointerMappingReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.MapLen() _ = len(r.Map()) }) } func FuzzParseSetModifierMappingReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseSetModifierMappingReply(raw) if !ok { if len(raw) >= 32 { t.Fatal("rejected a complete fixed-size reply") } return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.Status() }) } func FuzzParseGetModifierMappingReply(f *testing.F) { f.Add(make([]byte, 32)) f.Fuzz(func(t *testing.T, raw []byte) { r, ok := ParseGetModifierMappingReply(raw) if !ok { return } if len(r.Raw()) != len(raw) { t.Fatal("Raw must return the parsed bytes") } _ = r.KeycodesPerModifier() { l0 := r.Keycodes() for i := 0; i < l0.Len(); i++ { _ = l0.At(i) } } }) }