3 ms·
Depends on why you have that test. If you have a function that's supposed to return a null value under certain conditions, then by all means test for it as part
by ubernostrum 17y ago
Depends on why you have that test. If you have a function that's supposed to return a null value under certain conditions, then by all means test for it as part of verifying that the code behaves correctly. But if you're obsessively adding "assert the return value is not null" tests for every function, then yeah, you're doin it wrong.