Lines Matching defs:lower

167         unsigned lower, upper;
170 assert_se(parse_range("111", &lower, &upper) == 0);
171 assert_se(lower == 111);
174 assert_se(parse_range("111-123", &lower, &upper) == 0);
175 assert_se(lower == 111);
178 assert_se(parse_range("123-111", &lower, &upper) == 0);
179 assert_se(lower == 123);
182 assert_se(parse_range("123-123", &lower, &upper) == 0);
183 assert_se(lower == 123);
186 assert_se(parse_range("0", &lower, &upper) == 0);
187 assert_se(lower == 0);
190 assert_se(parse_range("0-15", &lower, &upper) == 0);
191 assert_se(lower == 0);
194 assert_se(parse_range("15-0", &lower, &upper) == 0);
195 assert_se(lower == 15);
198 assert_se(parse_range("128-65535", &lower, &upper) == 0);
199 assert_se(lower == 128);
202 assert_se(parse_range("1024-4294967295", &lower, &upper) == 0);
203 assert_se(lower == 1024);
207 assert_se(parse_range(" 111", &lower, &upper) == 0);
208 assert_se(lower == 111);
211 assert_se(parse_range(" 111-123", &lower, &upper) == 0);
212 assert_se(lower == 111);
215 assert_se(parse_range("111- 123", &lower, &upper) == 0);
216 assert_se(lower == 111);
219 assert_se(parse_range("\t111-\t123", &lower, &upper) == 0);
220 assert_se(lower == 111);
223 assert_se(parse_range(" \t 111- \t 123", &lower, &upper) == 0);
224 assert_se(lower == 111);
228 lower = upper = 9999;
229 assert_se(parse_range("111garbage", &lower, &upper) == -EINVAL);
230 assert_se(lower == 9999);
233 assert_se(parse_range("garbage111", &lower, &upper) == -EINVAL);
234 assert_se(lower == 9999);
237 assert_se(parse_range("garbage", &lower, &upper) == -EINVAL);
238 assert_se(lower == 9999);
241 assert_se(parse_range("111-123garbage", &lower, &upper) == -EINVAL);
242 assert_se(lower == 9999);
245 assert_se(parse_range("111garbage-123", &lower, &upper) == -EINVAL);
246 assert_se(lower == 9999);
250 lower = upper = 9999;
251 assert_se(parse_range("", &lower, &upper) == -EINVAL);
252 assert_se(lower == 9999);
256 assert_se(parse_range("111--123", &lower, &upper) == -ERANGE);
257 assert_se(lower == 9999);
260 assert_se(parse_range("-111-123", &lower, &upper) == -EINVAL);
261 assert_se(lower == 9999);
264 assert_se(parse_range("111-123-", &lower, &upper) == -EINVAL);
265 assert_se(lower == 9999);
268 assert_se(parse_range("111.4-123", &lower, &upper) == -EINVAL);
269 assert_se(lower == 9999);
272 assert_se(parse_range("111-123.4", &lower, &upper) == -EINVAL);
273 assert_se(lower == 9999);
276 assert_se(parse_range("111,4-123", &lower, &upper) == -EINVAL);
277 assert_se(lower == 9999);
280 assert_se(parse_range("111-123,4", &lower, &upper) == -EINVAL);
281 assert_se(lower == 9999);
285 assert_se(parse_range("111-", &lower, &upper) == -EINVAL);
286 assert_se(lower == 9999);
289 assert_se(parse_range("111-123-", &lower, &upper) == -EINVAL);
290 assert_se(lower == 9999);
293 assert_se(parse_range("111--", &lower, &upper) == -EINVAL);
294 assert_se(lower == 9999);
297 assert_se(parse_range("111- ", &lower, &upper) == -EINVAL);
298 assert_se(lower == 9999);
302 assert_se(parse_range("111 123", &lower, &upper) == -EINVAL);
303 assert_se(lower == 9999);
306 assert_se(parse_range("111\t123", &lower, &upper) == -EINVAL);
307 assert_se(lower == 9999);
310 assert_se(parse_range("111 \t 123", &lower, &upper) == -EINVAL);
311 assert_se(lower == 9999);
315 assert_se(parse_range("111 ", &lower, &upper) == -EINVAL);
316 assert_se(lower == 9999);
319 assert_se(parse_range("111-123 ", &lower, &upper) == -EINVAL);
320 assert_se(lower == 9999);
323 assert_se(parse_range("111 -123", &lower, &upper) == -EINVAL);
324 assert_se(lower == 9999);
327 assert_se(parse_range("111 -123 ", &lower, &upper) == -EINVAL);
328 assert_se(lower == 9999);
331 assert_se(parse_range("111\t-123\t", &lower, &upper) == -EINVAL);
332 assert_se(lower == 9999);
335 assert_se(parse_range("111 \t -123 \t ", &lower, &upper) == -EINVAL);
336 assert_se(lower == 9999);
340 assert_se(parse_range("0-18446744073709551616", &lower, &upper) == -ERANGE);
341 assert_se(lower == 9999);