Lines Matching refs:upper

167         unsigned lower, upper;
170 assert_se(parse_range("111", &lower, &upper) == 0);
172 assert_se(upper == 111);
174 assert_se(parse_range("111-123", &lower, &upper) == 0);
176 assert_se(upper == 123);
178 assert_se(parse_range("123-111", &lower, &upper) == 0);
180 assert_se(upper == 111);
182 assert_se(parse_range("123-123", &lower, &upper) == 0);
184 assert_se(upper == 123);
186 assert_se(parse_range("0", &lower, &upper) == 0);
188 assert_se(upper == 0);
190 assert_se(parse_range("0-15", &lower, &upper) == 0);
192 assert_se(upper == 15);
194 assert_se(parse_range("15-0", &lower, &upper) == 0);
196 assert_se(upper == 0);
198 assert_se(parse_range("128-65535", &lower, &upper) == 0);
200 assert_se(upper == 65535);
202 assert_se(parse_range("1024-4294967295", &lower, &upper) == 0);
204 assert_se(upper == 4294967295);
207 assert_se(parse_range(" 111", &lower, &upper) == 0);
209 assert_se(upper == 111);
211 assert_se(parse_range(" 111-123", &lower, &upper) == 0);
213 assert_se(upper == 123);
215 assert_se(parse_range("111- 123", &lower, &upper) == 0);
217 assert_se(upper == 123);
219 assert_se(parse_range("\t111-\t123", &lower, &upper) == 0);
221 assert_se(upper == 123);
223 assert_se(parse_range(" \t 111- \t 123", &lower, &upper) == 0);
225 assert_se(upper == 123);
228 lower = upper = 9999;
229 assert_se(parse_range("111garbage", &lower, &upper) == -EINVAL);
231 assert_se(upper == 9999);
233 assert_se(parse_range("garbage111", &lower, &upper) == -EINVAL);
235 assert_se(upper == 9999);
237 assert_se(parse_range("garbage", &lower, &upper) == -EINVAL);
239 assert_se(upper == 9999);
241 assert_se(parse_range("111-123garbage", &lower, &upper) == -EINVAL);
243 assert_se(upper == 9999);
245 assert_se(parse_range("111garbage-123", &lower, &upper) == -EINVAL);
247 assert_se(upper == 9999);
250 lower = upper = 9999;
251 assert_se(parse_range("", &lower, &upper) == -EINVAL);
253 assert_se(upper == 9999);
256 assert_se(parse_range("111--123", &lower, &upper) == -ERANGE);
258 assert_se(upper == 9999);
260 assert_se(parse_range("-111-123", &lower, &upper) == -EINVAL);
262 assert_se(upper == 9999);
264 assert_se(parse_range("111-123-", &lower, &upper) == -EINVAL);
266 assert_se(upper == 9999);
268 assert_se(parse_range("111.4-123", &lower, &upper) == -EINVAL);
270 assert_se(upper == 9999);
272 assert_se(parse_range("111-123.4", &lower, &upper) == -EINVAL);
274 assert_se(upper == 9999);
276 assert_se(parse_range("111,4-123", &lower, &upper) == -EINVAL);
278 assert_se(upper == 9999);
280 assert_se(parse_range("111-123,4", &lower, &upper) == -EINVAL);
282 assert_se(upper == 9999);
285 assert_se(parse_range("111-", &lower, &upper) == -EINVAL);
287 assert_se(upper == 9999);
289 assert_se(parse_range("111-123-", &lower, &upper) == -EINVAL);
291 assert_se(upper == 9999);
293 assert_se(parse_range("111--", &lower, &upper) == -EINVAL);
295 assert_se(upper == 9999);
297 assert_se(parse_range("111- ", &lower, &upper) == -EINVAL);
299 assert_se(upper == 9999);
302 assert_se(parse_range("111 123", &lower, &upper) == -EINVAL);
304 assert_se(upper == 9999);
306 assert_se(parse_range("111\t123", &lower, &upper) == -EINVAL);
308 assert_se(upper == 9999);
310 assert_se(parse_range("111 \t 123", &lower, &upper) == -EINVAL);
312 assert_se(upper == 9999);
315 assert_se(parse_range("111 ", &lower, &upper) == -EINVAL);
317 assert_se(upper == 9999);
319 assert_se(parse_range("111-123 ", &lower, &upper) == -EINVAL);
321 assert_se(upper == 9999);
323 assert_se(parse_range("111 -123", &lower, &upper) == -EINVAL);
325 assert_se(upper == 9999);
327 assert_se(parse_range("111 -123 ", &lower, &upper) == -EINVAL);
329 assert_se(upper == 9999);
331 assert_se(parse_range("111\t-123\t", &lower, &upper) == -EINVAL);
333 assert_se(upper == 9999);
335 assert_se(parse_range("111 \t -123 \t ", &lower, &upper) == -EINVAL);
337 assert_se(upper == 9999);
340 assert_se(parse_range("0-18446744073709551616", &lower, &upper) == -ERANGE);
342 assert_se(upper == 9999);