func TestAddition(t *testing.T) { a, b := 2, 3 expected := 5 actual := a + b if actual != expected { t.Logf("expected %d, but got %d", expected, actual) t.Fail() } }In this example, we test the addition of two integers a and b and ensure that the result matches the expected value using the if statement. If the values don't match, we log an error message using the Logf method and fail the test using the Fail method. This method belongs to the testing package, which is included in the standard library of Go.