2 ms·
I've come to believe that sometimes it _is_ worth unit testing other people's code, counter to the popular advice. I've never heard that advice I basically al
by chubot 2y ago
I've come to believe that sometimes it _is_ worth unit testing other people's code, counter to the popular advice.
I've never heard that advice
I basically always unit test the code I depend on -- to learn how it works!
---
libc in particular is worth unit testing. C has lots of "creative" APIs that are easy to misuse.
Like functions that return the same static buffer over and over again. I think the only way you find that is by running tests with ASAN enabled ...
libc functions also have so many error conditions, and they may differ between platforms.