FxLibcTest/src/stdlib/sizes.c

23 lines
622 B
C

#include <stdlib.h>
#include <ft/test.h>
#include <ft/all-tests.h>
static void _stdlib_sizes(ft_test *t)
{
/* TODO: Use %zu once available in *printf */
ft_log(t, "Size of types for conversion:\n\n");
ft_log(t, " %d float\n", (int)sizeof(float));
ft_log(t, " %d double\n", (int)sizeof(double));
ft_log(t, " %d long double\n", (int)sizeof(long double));
ft_log(t, " %d int\n", (int)sizeof(int));
ft_log(t, " %d long int\n", (int)sizeof(long int));
ft_log(t, " %d long long int\n", (int)sizeof(long long int));
}
ft_test ft_stdlib_sizes = {
.name = "Size of numeric types",
.function = _stdlib_sizes,
};