main 602baa7

replies_fuzz_test.go RawHistoryFolder

1// Code generated by xtgen; DO NOT EDIT.
2package render
3
4import "testing"
5import "bnema.dev/xturbo/internal/xtest"
6
7func FuzzParseQueryVersionReply(f *testing.F) {
8	f.Add(make([]byte, 32))
9	f.Fuzz(func(t *testing.T, raw []byte) {
10		r, ok := ParseQueryVersionReply(raw)
11		if !ok {
12			if len(raw) >= 32 {
13				t.Fatal("rejected a complete fixed-size reply")
14			}
15			return
16		}
17		if len(r.Raw()) != len(raw) {
18			t.Fatal("Raw must return the parsed bytes")
19		}
20		_ = r.MajorVersion()
21		_ = r.MinorVersion()
22	})
23}
24
25func FuzzParseQueryPictFormatsReply(f *testing.F) {
26	f.Add(make([]byte, 32))
27	if raw, err := xtest.LoadHex("../testdata/golden/render/QueryPictFormats.reply.hex"); err != nil {
28		f.Fatal(err)
29	} else {
30		f.Add(raw)
31	}
32	f.Fuzz(func(t *testing.T, raw []byte) {
33		r, ok := ParseQueryPictFormatsReply(raw)
34		if !ok {
35			return
36		}
37		if len(r.Raw()) != len(raw) {
38			t.Fatal("Raw must return the parsed bytes")
39		}
40		_ = r.NumFormats()
41		_ = r.NumScreens()
42		_ = r.NumDepths()
43		_ = r.NumVisuals()
44		_ = r.NumSubpixel()
45		{
46			l0 := r.Formats()
47			for i := 0; i < l0.Len(); i++ {
48				_ = l0.At(i)
49			}
50		}
51		{
52			it0 := r.Screens()
53			for it0.Next() {
54				_ = it0.Value().NumDepths()
55				_ = it0.Value().Fallback()
56				{
57					it1 := it0.Value().Depths()
58					for it1.Next() {
59						_ = it1.Value().Depth()
60						_ = it1.Value().NumVisuals()
61						{
62							l2 := it1.Value().Visuals()
63							for i := 0; i < l2.Len(); i++ {
64								_ = l2.At(i)
65							}
66						}
67					}
68					if it1.Err() {
69						t.Fatal("iterator error after successful Parse")
70					}
71				}
72			}
73			if it0.Err() {
74				t.Fatal("iterator error after successful Parse")
75			}
76		}
77		{
78			l0 := r.Subpixels()
79			for i := 0; i < l0.Len(); i++ {
80				_ = l0.At(i)
81			}
82		}
83	})
84}
85
86func FuzzParseQueryPictIndexValuesReply(f *testing.F) {
87	f.Add(make([]byte, 32))
88	f.Fuzz(func(t *testing.T, raw []byte) {
89		r, ok := ParseQueryPictIndexValuesReply(raw)
90		if !ok {
91			return
92		}
93		if len(r.Raw()) != len(raw) {
94			t.Fatal("Raw must return the parsed bytes")
95		}
96		_ = r.NumValues()
97		{
98			l0 := r.Values()
99			for i := 0; i < l0.Len(); i++ {
100				_ = l0.At(i)
101			}
102		}
103	})
104}
105
106func FuzzParseQueryFiltersReply(f *testing.F) {
107	f.Add(make([]byte, 32))
108	f.Fuzz(func(t *testing.T, raw []byte) {
109		r, ok := ParseQueryFiltersReply(raw)
110		if !ok {
111			return
112		}
113		if len(r.Raw()) != len(raw) {
114			t.Fatal("Raw must return the parsed bytes")
115		}
116		_ = r.NumAliases()
117		_ = r.NumFilters()
118		{
119			l0 := r.Aliases()
120			for i := 0; i < l0.Len(); i++ {
121				_ = l0.At(i)
122			}
123		}
124		{
125			it0 := r.Filters()
126			for it0.Next() {
127				_ = it0.Value().NameLen()
128				_ = len(it0.Value().Name())
129			}
130			if it0.Err() {
131				t.Fatal("iterator error after successful Parse")
132			}
133		}
134	})
135}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 1

↑↓ moveenter openesc close