3 ms·
A long time ago I implemented a similar (less flexible) thing for C, also as a sort of goofy learning experience: https://github.com/mgraczyk/fast_check_once/b
by mgraczyk 5y ago
A long time ago I implemented a similar (less flexible) thing for C, also as a sort of goofy learning experience:
https://github.com/mgraczyk/fast_check_once/blob/master/fast_check.h https://github.com/mgraczyk/fast_check_once/blob/master/fast...
There's something really appealing about replacing code at runtime to "hack" the bypass normal behavior of the language. For testing/mocking this can even be useful.