On package names for Go tests

Most every public facing package I make starts with example_test.go with a external package "black bock" as referred to here. It's even more important the less familiar I am on the libraries problem domain, since it is likely the only opportunity I'll get for the rest of my career to view the package from that perspective. What I mean is the chance to think how a user that just has a problem statement, maybe a few keywords would expect to dive in. It's easy to forget what that feels like once you are familiar with the problem, so I like to have my immediate thoughts documented so I can help guide them along as the API changes to something more reasonable to the problem.

White box is.. cover all the things, make sure I can come back to my code in one or two years and when I start tearing stuff out calling myself a idiot .. old me doesn't have the last laugh when I git --reset HEAD because although old me certainly sucked, he was familiar with the problem :-) Both are invaluable, I could survive without black box testing if I had to pick a favorite.

/r/golang Thread Parent Link - lanreadelowo.com