- Ending a file’s name with
_test.go
tells thego test
command that this file contains test functions. - Use function name like
TestSTH
, passt *testing.T
as parameter - Example:
Nov 05, 20231 min read
_test.go
tells the go test
command that this file contains test functions.TestSTH
, pass t *testing.T
as parameter