Skip to content

Glossary: Go Basics

Test

Also written: tests, testing, testing.T

A `TestXxx(t *testing.T)` function in a `_test.go` file that calls your code with known inputs and checks the results. `t.Errorf` marks failure and carries on, while `t.Fatalf` fails and stops.

Where the book teaches it

Related terms

go test