4 ms·
Test coverage varies a lot, but error paths seem almost universally untested.
by wat10000 2mo ago
Test coverage varies a lot, but error paths seem almost universally untested.
- inigyou 2mo agoSQLite is the exception. But they still test with fake errors, not real errors. For example they intercept malloc and make the first malloc call fail, run the tests, change it to second call, run the tests, ... and with two modes: only one call fails, or all calls fail after that. They can afford to do this exhaustively because the test criterion is universal: they are testing ACIDity - the database is either in the new state or the old state. Never in between or corrupted. Any other kind of system wouldn't be so easy to test for malloc failure, since you couldn't check for things like a successful response.