Lines Matching refs:parse_size
310 TEST(parse_size, complete) { in TEST() argument
313 ASSERT_EQ(0, parse_size(&size, "42")); in TEST()
316 ASSERT_EQ(0, parse_size(&size, "16K")); in TEST()
319 ASSERT_EQ(0, parse_size(&size, "1M")); in TEST()
323 ASSERT_EQ(0, parse_size(&size, "3G")); in TEST()
327 ASSERT_EQ(0, parse_size(&size, "4294967294")); in TEST()
333 ASSERT_EQ(0, parse_size(&size, "9E")); in TEST()
337 ASSERT_EQ(0, parse_size(&size, "15E")); in TEST()
341 ASSERT_EQ(0, parse_size(&size, "18446744073709551614")); in TEST()
345 ASSERT_EQ(-ERANGE, parse_size(&size, "16E")); in TEST()
346 ASSERT_EQ(-ERANGE, parse_size(&size, "19E")); in TEST()
347 ASSERT_EQ(-EINVAL, parse_size(&size, "7GTPE")); in TEST()
349 ASSERT_EQ(-ERANGE, parse_size(&size, "5G")); in TEST()
350 ASSERT_EQ(-ERANGE, parse_size(&size, "9G")); in TEST()
351 ASSERT_EQ(-ERANGE, parse_size(&size, "9E")); in TEST()
352 ASSERT_EQ(-ERANGE, parse_size(&size, "7GTPE")); in TEST()
355 ASSERT_EQ(-EINVAL, parse_size(&size, "")); in TEST()
356 ASSERT_EQ(-EINVAL, parse_size(&size, "14u")); in TEST()
357 ASSERT_EQ(-EINVAL, parse_size(&size, "14.2G")); in TEST()
358 ASSERT_EQ(-EINVAL, parse_size(&size, "-1G")); in TEST()
359 ASSERT_EQ(-EINVAL, parse_size(&size, "; /bin/rm -- ")); in TEST()