4 ms·
> There, exception-handling code is scattered pervasively throughout the system, and much of it cannot be executed in any practical test process. Systematicall
by layer8 5y ago
> There, exception-handling code is scattered pervasively throughout the system, and much of it cannot be executed in any practical test process.
Systematically testing that software is crash-proof isn’t exactly easier though.
Regarding exceptions, one technique, if you can hook the throw sites, is to increment a counter anytime a throwing condition could occur, and in the tests indiscriminately throw an exception when the counter reaches N, and repeat that for N=1…MAX.
- ncmncm 5y agoIn C++, anyway, the same code -- destructors -- gets run for throws as for normal exits, so almost everything is tested all the time in normal operation.