package main import ( "testing" ) func TestAdd(t *testing.T) { expected := 3 result := Add(1, 2) if result != expected { t.Errorf("Add function returned an incorrect result. Expected %d, but got %d", expected, result) } } func Add(a, b int) int { return a + b }In this example, we test the Add function by passing it two parameters, and then comparing the result to the expected value. If the result does not match the expected value, we use the t.Errorf() function to print out an error message. This package/library is built-in in the Go language.