Your function looks like it's doing I/O, which won't work at compile time test. Here's an example of a unittest for the ImportC compiler:
struct S22079
{
int a, b, c;
};
_Static_assert(sizeof(struct S22079){1,2,3} == sizeof(int)*3, "ok");
_Static_assert(sizeof(struct S22079){1,2,3}.a == sizeof(int), "ok");
The semantics are checked at compile time, so no need to link & run. With the large volume of tests, this speeds things up considerably. The faster the test suite runs, the more productive I am.