News for hackers. Stuff that matters.
Re:Generating unit tests in Go by ori_b on Wednesday December 30, 2015 @06:22PM (#10815067)
Generally, I see a lot of testing of internal functions, which often should change their contract as refactoring happens.

All too rarely do I see people focusing testing on public APIs.

Re:Generating unit tests in Go by eropple on Wednesday December 30, 2015 @07:31PM (#10815384)
It depends on your definition of "internal". I write unit tests at whatever boundary that makes sense, and I certainly will write unit tests to test contracts between related pieces that others might call "internal." But then I can refactor trivially at that level, which I may (read: usually do) want to have available later.

I don't generally write, nor really see, see a lot of internal contractual testing in unit testing (not least because it becomes very hard to do so if you actually use visibility in OOP).