Ah!! Thanks a lot! (was planning to do next to get the correct output
first, but get confused as the go output)
On Sat, Apr 22, 2017 at 6:50 AM, Ian Davis wrote:
> The link says "Example functions without output comments are compiled but
> not executed."
>
> You don't appear to have the necessar
On Sat, 22 Apr 2017, at 02:51 AM, Tong Sun wrote:
> I'm afraid that you are wrong at both points.
>
> - tests needn't have to use the the *same *package name, in this case
> *package pybr *is good, but *package pybr_test *is good as well.> - func
> TestXxx is not the only signature allowed, se
I'm afraid that you are wrong at both points.
- tests needn't have to use the the *same *package name, in this case
*package pybr *is good, but *package pybr_test *is good as well.
- func TestXxx is not the only signature allowed, see
https://golang.org/pkg/testing/#hdr-Examples
but thanks for yo
Yes, your tests should have the the *same *package name as your code, so in
this case *package pybr*. They will not effect the package when built
normally. They are only included when running *go test*. You also need to
name your tests correctly, and they need a signature like:
func TestXxx(*t