1. Ending a file’s name with _test.go tells the go test command that this file contains test functions.
  2. Use function name like TestSTH, pass t *testing.T as parameter
  3. Example:
package main
 
import "testing"
 
func TestAdd(t *testing.T) {
    if add(1, 2) != 3 {
        t.Fail()
    }
}