Changeset e3272101 in mainline for uspace/lib/c/test/imath.c
- Timestamp:
- 2019-02-11T14:08:52Z (6 years ago)
- Children:
- d5a89a3
- Parents:
- aa57bf7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/test/imath.c
raa57bf7 re3272101 78 78 PCUT_TEST(ilog10_u64_zero) 79 79 { 80 unsigned ret = ilog10_u64(0); 81 PCUT_ASSERT_INT_EQUALS(0, ret); 80 unsigned res; 81 errno_t ret = ilog10_u64(0, &res); 82 PCUT_ASSERT_ERRNO_VAL(ERANGE, ret); 82 83 } 83 84 84 85 PCUT_TEST(ilog10_u64_one) 85 86 { 86 unsigned ret = ilog10_u64(1); 87 PCUT_ASSERT_INT_EQUALS(0, ret); 87 unsigned res; 88 errno_t ret = ilog10_u64(1, &res); 89 PCUT_ASSERT_ERRNO_VAL(EOK, ret); 90 PCUT_ASSERT_INT_EQUALS(0, res); 88 91 } 89 92 90 93 PCUT_TEST(ilog10_u64_max) 91 94 { 92 unsigned ret = ilog10_u64(MAX_NUM); 93 PCUT_ASSERT_INT_EQUALS(MAX_EXP, ret); 95 unsigned res; 96 errno_t ret = ilog10_u64(MAX_NUM, &res); 97 PCUT_ASSERT_ERRNO_VAL(EOK, ret); 98 PCUT_ASSERT_INT_EQUALS(MAX_EXP, res); 94 99 } 95 100
Note:
See TracChangeset
for help on using the changeset viewer.