When I was writing lots of C, I found that unit testing wasn't able to test for the things that I really wanted. Looking back, I think adding -fsanitize=undefined or similar to the compiler options for my test suite would have gotten me much closer to where I'd liked to have been.