Debian Codegraph @

debian/patches/0002-Remove-tests-which-fail-on-i386.patch

raw
1 From: "Dr. Tobias Quathamer" <[email protected]>
2 Date: Wed, 25 Mar 2026 13:22:10 +0100
3 Subject: Remove tests which fail on i386
4
5 This is due to an 'int' overflow on 32 bit.
6
7 Forwarded: https://github.com/anthropics/anthropic-sdk-go/issues/304
8 ---
9 internal/apiform/form_test.go | 136 ----------------------------------------
10 internal/apijson/json_test.go | 35 -----------
11 internal/apiquery/query_test.go | 43 -------------
12 3 files changed, 214 deletions(-)
13
14 diff --git a/internal/apiform/form_test.go b/internal/apiform/form_test.go
15 index d6df84e..40e7832 100644
16 --- a/internal/apiform/form_test.go
17 +++ b/internal/apiform/form_test.go
18 @@ -179,47 +179,6 @@ false
19 map[string]any{"a": float64(1), "b": "str", "c": false},
20 },
21
22 - "primitive_struct": {
23 - `--xxx
24 -Content-Disposition: form-data; name="a"
25 -
26 -false
27 ---xxx
28 -Content-Disposition: form-data; name="b"
29 -
30 -237628372683
31 ---xxx
32 -Content-Disposition: form-data; name="c"
33 -
34 -654
35 ---xxx
36 -Content-Disposition: form-data; name="d"
37 -
38 -9999.43
39 ---xxx
40 -Content-Disposition: form-data; name="e"
41 -
42 -43.76
43 ---xxx
44 -Content-Disposition: form-data; name="f.0"
45 -
46 -1
47 ---xxx
48 -Content-Disposition: form-data; name="f.1"
49 -
50 -2
51 ---xxx
52 -Content-Disposition: form-data; name="f.2"
53 -
54 -3
55 ---xxx
56 -Content-Disposition: form-data; name="f.3"
57 -
58 -4
59 ---xxx--
60 -`,
61 - Primitives{A: false, B: 237628372683, C: uint(654), D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}},
62 - },
63 "primitive_struct,brackets": {
64 `--xxx
65 Content-Disposition: form-data; name="f[]"
66 @@ -242,101 +201,6 @@ Content-Disposition: form-data; name="f[]"
67 PrimitivesBrackets{F: []int_{1, 2, 3, 4}},
68 },
69
70 - "slices": {
71 - `--xxx
72 -Content-Disposition: form-data; name="slices.0.a"
73 -
74 -false
75 ---xxx
76 -Content-Disposition: form-data; name="slices.0.b"
77 -
78 -237628372683
79 ---xxx
80 -Content-Disposition: form-data; name="slices.0.c"
81 -
82 -654
83 ---xxx
84 -Content-Disposition: form-data; name="slices.0.d"
85 -
86 -9999.43
87 ---xxx
88 -Content-Disposition: form-data; name="slices.0.e"
89 -
90 -43.76
91 ---xxx
92 -Content-Disposition: form-data; name="slices.0.f.0"
93 -
94 -1
95 ---xxx
96 -Content-Disposition: form-data; name="slices.0.f.1"
97 -
98 -2
99 ---xxx
100 -Content-Disposition: form-data; name="slices.0.f.2"
101 -
102 -3
103 ---xxx
104 -Content-Disposition: form-data; name="slices.0.f.3"
105 -
106 -4
107 ---xxx--
108 -`,
109 - Slices{
110 - Slice: []Primitives{{A: false, B: 237628372683, C: uint(654), D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}}},
111 - },
112 - },
113 - "primitive_pointer_struct": {
114 - `--xxx
115 -Content-Disposition: form-data; name="a"
116 -
117 -false
118 ---xxx
119 -Content-Disposition: form-data; name="b"
120 -
121 -237628372683
122 ---xxx
123 -Content-Disposition: form-data; name="c"
124 -
125 -654
126 ---xxx
127 -Content-Disposition: form-data; name="d"
128 -
129 -9999.43
130 ---xxx
131 -Content-Disposition: form-data; name="e"
132 -
133 -43.76
134 ---xxx
135 -Content-Disposition: form-data; name="f.0"
136 -
137 -1
138 ---xxx
139 -Content-Disposition: form-data; name="f.1"
140 -
141 -2
142 ---xxx
143 -Content-Disposition: form-data; name="f.2"
144 -
145 -3
146 ---xxx
147 -Content-Disposition: form-data; name="f.3"
148 -
149 -4
150 ---xxx
151 -Content-Disposition: form-data; name="f.4"
152 -
153 -5
154 ---xxx--
155 -`,
156 - PrimitivePointers{
157 - A: P(false),
158 - B: P(237628372683),
159 - C: P(uint(654)),
160 - D: P(9999.43),
161 - E: P(float32(43.76)),
162 - F: &[]int{1, 2, 3, 4, 5},
163 - },
164 - },
165
166 "datetime_struct": {
167 `--xxx
168 diff --git a/internal/apijson/json_test.go b/internal/apijson/json_test.go
169 index 19b3614..f0f2f54 100644
170 --- a/internal/apijson/json_test.go
171 +++ b/internal/apijson/json_test.go
172 @@ -364,30 +364,6 @@ var tests = map[string]struct {
173 "map_string_with_sjson_path_chars": {`{":a.b.c*:d*-1e.f":"bar"}`, map[string]string{":a.b.c*:d*-1e.f": "bar"}},
174 "map_interface": {`{"a":1,"b":"str","c":false}`, map[string]any{"a": float64(1), "b": "str", "c": false}},
175
176 - "primitive_struct": {
177 - `{"a":false,"b":237628372683,"c":654,"d":9999.43,"e":43.76,"f":[1,2,3,4]}`,
178 - Primitives{A: false, B: 237628372683, C: uint(654), D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}},
179 - },
180 -
181 - "slices": {
182 - `{"slices":[{"a":false,"b":237628372683,"c":654,"d":9999.43,"e":43.76,"f":[1,2,3,4]}]}`,
183 - Slices{
184 - Slice: []Primitives{{A: false, B: 237628372683, C: uint(654), D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}}},
185 - },
186 - },
187 -
188 - "primitive_pointer_struct": {
189 - `{"a":false,"b":237628372683,"c":654,"d":9999.43,"e":43.76,"f":[1,2,3,4,5]}`,
190 - PrimitivePointers{
191 - A: P(false),
192 - B: P(237628372683),
193 - C: P(uint(654)),
194 - D: P(9999.43),
195 - E: P(float32(43.76)),
196 - F: &[]int{1, 2, 3, 4, 5},
197 - },
198 - },
199 -
200 "datetime_struct": {
201 `{"date":"2006-01-02","date-time":"2006-01-02T15:04:05Z"}`,
202 DateTime{
203 @@ -561,17 +537,6 @@ var tests = map[string]struct {
204 []UnmarshalStruct{{Foo: "hello", prop: true}},
205 },
206
207 - "inline_coerce": {
208 - `{"a":false,"b":237628372683,"c":654,"d":9999.43,"e":43.76,"f":[1,2,3,4]}`,
209 - Inline{
210 - InlineField: Primitives{A: false, B: 237628372683, C: 0x28e, D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}},
211 - JSON: InlineJSON{
212 - InlineField: Field{raw: "{\"a\":false,\"b\":237628372683,\"c\":654,\"d\":9999.43,\"e\":43.76,\"f\":[1,2,3,4]}", status: 3},
213 - raw: "{\"a\":false,\"b\":237628372683,\"c\":654,\"d\":9999.43,\"e\":43.76,\"f\":[1,2,3,4]}",
214 - },
215 - },
216 - },
217 -
218 "inline_array_coerce": {
219 `["Hello","foo","bar"]`,
220 InlineArray{
221 diff --git a/internal/apiquery/query_test.go b/internal/apiquery/query_test.go
222 index 22c19d6..5c36f74 100644
223 --- a/internal/apiquery/query_test.go
224 +++ b/internal/apiquery/query_test.go
225 @@ -133,24 +133,6 @@ var tests = map[string]struct {
226 val any
227 settings QuerySettings
228 }{
229 - "primitives": {
230 - "a=false&b=237628372683&c=654&d=9999.43&e=43.7599983215332&f=1,2,3,4",
231 - Primitives{A: false, B: 237628372683, C: uint(654), D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}},
232 - QuerySettings{},
233 - },
234 -
235 - "slices_brackets": {
236 - `mixed[]=1&mixed[]=2.3&mixed[]=hello&slices[][a]=false&slices[][a]=false&slices[][b]=237628372683&slices[][b]=237628372683&slices[][c]=654&slices[][c]=654&slices[][d]=9999.43&slices[][d]=9999.43&slices[][e]=43.7599983215332&slices[][e]=43.7599983215332&slices[][f][]=1&slices[][f][]=2&slices[][f][]=3&slices[][f][]=4&slices[][f][]=1&slices[][f][]=2&slices[][f][]=3&slices[][f][]=4`,
237 - Slices{
238 - Slice: []Primitives{
239 - {A: false, B: 237628372683, C: uint(654), D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}},
240 - {A: false, B: 237628372683, C: uint(654), D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}},
241 - },
242 - Mixed: []any{1, 2.3, "hello"},
243 - },
244 - QuerySettings{ArrayFormat: ArrayQueryFormatBrackets},
245 - },
246 -
247 "slices_comma": {
248 `mixed=1,2.3,hello`,
249 Slices{
250 @@ -159,31 +141,6 @@ var tests = map[string]struct {
251 QuerySettings{ArrayFormat: ArrayQueryFormatComma},
252 },
253
254 - "slices_repeat": {
255 - `mixed=1&mixed=2.3&mixed=hello&slices[a]=false&slices[a]=false&slices[b]=237628372683&slices[b]=237628372683&slices[c]=654&slices[c]=654&slices[d]=9999.43&slices[d]=9999.43&slices[e]=43.7599983215332&slices[e]=43.7599983215332&slices[f]=1&slices[f]=2&slices[f]=3&slices[f]=4&slices[f]=1&slices[f]=2&slices[f]=3&slices[f]=4`,
256 - Slices{
257 - Slice: []Primitives{
258 - {A: false, B: 237628372683, C: uint(654), D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}},
259 - {A: false, B: 237628372683, C: uint(654), D: 9999.43, E: 43.76, F: []int{1, 2, 3, 4}},
260 - },
261 - Mixed: []any{1, 2.3, "hello"},
262 - },
263 - QuerySettings{ArrayFormat: ArrayQueryFormatRepeat},
264 - },
265 -
266 - "primitive_pointer_struct": {
267 - "a=false&b=237628372683&c=654&d=9999.43&e=43.7599983215332&f=1,2,3,4,5",
268 - PrimitivePointers{
269 - A: P(false),
270 - B: P(237628372683),
271 - C: P(uint(654)),
272 - D: P(9999.43),
273 - E: P(float32(43.76)),
274 - F: &[]int{1, 2, 3, 4, 5},
275 - },
276 - QuerySettings{},
277 - },
278 -
279 "datetime_struct": {
280 `date=2006-01-02&date-time=2006-01-02T15:04:05Z`,
281 DateTime{