News for hackers. Stuff that matters.
Re:Unit Tests as Documentation by 8n4vidtmkvmk on Thursday October 17, 2024 @09:51PM (#41875681)
Yes, actually. Sometimes the edge cases that aren't covered by unit tests are undefined behavior. I don't recommend doing this frequently but sometimes it's hard to know the best way to handle weird edge cases until you gather more use cases so deliberately not writing a test for such things is a legit strategy IMO. You should probably also add to the method doc comment that invoking with X is not well defined.

There are no comments on this comment yet.