Go test package names

290 views
Skip to first unread message

ffohw...@gmail.com

unread,
Aug 3, 2016, 9:39:47 AM8/3/16
to golang-nuts
I've got a question about best practices for test file packages, I've seen this post http://stackoverflow.com/questions/19998250/proper-package-naming-for-testing-in-golang and wanted to know if there really was a best practice for writing tests, or if it really comes down to black/white box styles.


Message has been deleted

Uli Kunitz

unread,
Aug 3, 2016, 4:21:42 PM8/3/16
to golang-nuts, ffohw...@gmail.com
Tests are usually included in the package. Testing a package cannot become easier this way and it is the only way to test internal functions, types, variables or constants. However if you have large test files, it may make sense to keep them in a separate repository because go-getting the package would become extremely slow if included in the package.
Reply all
Reply to author
Forward
0 new messages