June 3, 2024
Session 4 Solution: hello_test.go
func TestHelloInigoMontoya(t *testing.T) { result := hello("inigo montoya") expected := "hello, inigo montoya" if result != expected { t.Errorf("result was incorrect, got: %v, want: %v.", result, expected) } } func TestHelloDuaLipa(t *testing.T) { result := hello("Dua Lipa") expected := "hello, Dua Lipa" if result != expected { t.Errorf("result was incorrect, got: %v, want: %v.", result, expected) } } func TestHelloDarthVader(t *testing.T) { result := hello("Darth Vader") expected := "hello, Darth Vader" if result !
read more