On Sunday, 5 February 2017 15:39:55 UTC+11, so.q...@gmail.com  wrote:
> I generally favor "external test packages", that is having "_test" as a 
> suffix to my test package names.
> For example, "package foo" (foo.go) would have a test file (foo_test.go) 
> named "package foo_test"
> 
> 
> I do so under the belief that it forces me to test against my package's 
> public interface and prevents any test functions from accidentally being 
> called in the main package.

Writing your tests like this makes TDD pretty hard unless you plan to make 
everything public
> 
> 
> Are those correct assumptions? Do you mostly use "external test packages"?

I don't, i think internal tests are for unit tests, external tests are for 
functional tests, maybe.
> 
> 
> Also, are all test files (*_test.go) NOT compiled into the build?

That is correct.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to