1 /* Test count trailing bits operations from stdbit.h
3 type: unsigned short, unsigned int, unsigned long, unsigned long long
8 #ifdef __SDCC // Todo: Enable for all C23 implementations
20 #ifdef __SDCC // Todo: Enable for all C23 implementations
22 ASSERT (stdc_count_trailing_ones(i
) == 0);
23 ASSERT (stdc_count_trailing_zeros(i
) == sizeof({type
}) * CHAR_BIT
);
26 ASSERT (stdc_count_trailing_ones(i
) == 1);
27 ASSERT (stdc_count_trailing_zeros(i
) == 0);
30 ASSERT (stdc_count_trailing_ones(i
) == 0);
31 ASSERT (stdc_count_trailing_zeros(i
) == 1);
34 ASSERT (stdc_count_trailing_ones(i
) == 2);
35 ASSERT (stdc_count_trailing_zeros(i
) == 0);
38 ASSERT (stdc_count_trailing_ones(i
) == 3);
39 ASSERT (stdc_count_trailing_zeros(i
) == 0);
42 ASSERT (stdc_count_trailing_ones(i
) == 0);
43 ASSERT (stdc_count_trailing_zeros(i
) == 3);
46 ASSERT (stdc_count_trailing_ones(i
) == 1);
47 ASSERT (stdc_count_trailing_zeros(i
) == 0);