detached 602baa7

replies_fuzz_test.go RawHistoryFolder

1// Code generated by xtgen; DO NOT EDIT.
2package res
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.ServerMajor()
21		_ = r.ServerMinor()
22	})
23}
24
25func FuzzParseQueryClientsReply(f *testing.F) {
26	f.Add(make([]byte, 32))
27	f.Fuzz(func(t *testing.T, raw []byte) {
28		r, ok := ParseQueryClientsReply(raw)
29		if !ok {
30			return
31		}
32		if len(r.Raw()) != len(raw) {
33			t.Fatal("Raw must return the parsed bytes")
34		}
35		_ = r.NumClients()
36		{
37			l0 := r.Clients()
38			for i := 0; i < l0.Len(); i++ {
39				_ = l0.At(i)
40			}
41		}
42	})
43}
44
45func FuzzParseQueryClientResourcesReply(f *testing.F) {
46	f.Add(make([]byte, 32))
47	f.Fuzz(func(t *testing.T, raw []byte) {
48		r, ok := ParseQueryClientResourcesReply(raw)
49		if !ok {
50			return
51		}
52		if len(r.Raw()) != len(raw) {
53			t.Fatal("Raw must return the parsed bytes")
54		}
55		_ = r.NumTypes()
56		{
57			l0 := r.Types()
58			for i := 0; i < l0.Len(); i++ {
59				_ = l0.At(i)
60			}
61		}
62	})
63}
64
65func FuzzParseQueryClientPixmapBytesReply(f *testing.F) {
66	f.Add(make([]byte, 32))
67	f.Fuzz(func(t *testing.T, raw []byte) {
68		r, ok := ParseQueryClientPixmapBytesReply(raw)
69		if !ok {
70			if len(raw) >= 32 {
71				t.Fatal("rejected a complete fixed-size reply")
72			}
73			return
74		}
75		if len(r.Raw()) != len(raw) {
76			t.Fatal("Raw must return the parsed bytes")
77		}
78		_ = r.Bytes()
79		_ = r.BytesOverflow()
80	})
81}
82
83func FuzzParseQueryClientIdsReply(f *testing.F) {
84	f.Add(make([]byte, 32))
85	if raw, err := xtest.LoadHex("../testdata/golden/res/QueryClientIds.reply.hex"); err != nil {
86		f.Fatal(err)
87	} else {
88		f.Add(raw)
89	}
90	f.Fuzz(func(t *testing.T, raw []byte) {
91		r, ok := ParseQueryClientIdsReply(raw)
92		if !ok {
93			return
94		}
95		if len(r.Raw()) != len(raw) {
96			t.Fatal("Raw must return the parsed bytes")
97		}
98		_ = r.NumIds()
99		{
100			it0 := r.Ids()
101			for it0.Next() {
102				_ = it0.Value().Spec()
103				_ = it0.Value().Length()
104				{
105					l1 := it0.Value().Value()
106					for i := 0; i < l1.Len(); i++ {
107						_ = l1.At(i)
108					}
109				}
110			}
111			if it0.Err() {
112				t.Fatal("iterator error after successful Parse")
113			}
114		}
115	})
116}
117
118func FuzzParseQueryResourceBytesReply(f *testing.F) {
119	f.Add(make([]byte, 32))
120	f.Fuzz(func(t *testing.T, raw []byte) {
121		r, ok := ParseQueryResourceBytesReply(raw)
122		if !ok {
123			return
124		}
125		if len(r.Raw()) != len(raw) {
126			t.Fatal("Raw must return the parsed bytes")
127		}
128		_ = r.NumSizes()
129		{
130			it0 := r.Sizes()
131			for it0.Next() {
132				_ = it0.Value().Size_()
133				_ = it0.Value().NumCrossReferences()
134				{
135					l1 := it0.Value().CrossReferences()
136					for i := 0; i < l1.Len(); i++ {
137						_ = l1.At(i)
138					}
139				}
140			}
141			if it0.Err() {
142				t.Fatal("iterator error after successful Parse")
143			}
144		}
145	})
146}

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