Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing: Improve "testing" package comment for beginners #7361

Closed
cgay opened this issue Feb 19, 2014 · 2 comments
Closed

testing: Improve "testing" package comment for beginners #7361

cgay opened this issue Feb 19, 2014 · 2 comments

Comments

@cgay
Copy link

cgay commented Feb 19, 2014

Go version: 1.2

The Overview section of the "testing" package docs could benefit from
including this line:

```You write a test by creating a file with a name ending in _test.go that contains
functions named TestXXX with signature func (t *testing.T). The test framework runs each
such function; if the function calls a failure function such as t.Error or t.Fail, the
test is considered to have failed.```

That would help beginners get their bearings. I eventually found that explanation here:
http://golang.org/doc/code.html#Testing

While writing my first tests I was looking around for something like assertEqual et al,
and that would have saved me a little time.

Thanks.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added repo-main, release-go1.3, documentation.

@robpike
Copy link
Contributor

robpike commented Feb 21, 2014

Comment 2:

This issue was closed by revision f1e4184.

Status changed to Fixed.

@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@rsc rsc removed the release-go1.3 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants