News for hackers. Stuff that matters.
Re:Go proposal: new package to provide generic slice functions by closeparen on Thursday May 06, 2021 @03:48PM (#27068259)
“Make sure it doesn’t catch the exception” is like “make sure it doesn’t do a tap dance” - there are quite a few things a function could do, we don’t generally ask unit testing to prove negatives.
Re:Go proposal: new package to provide generic slice functions by throwaway894345 on Friday May 07, 2021 @01:33PM (#27078521)
If you’re going to check that a function propagates an error in Go it equally makes sense to check that you check to make sure the equivalent Python/etc function propagates the exception. Of course I don’t think testing either of these is a good investment.