go-jack/main_test.go

13 lines
225 B
Go
Executable File

package main
import "testing"
func TestSayHi(t *testing.T) {
expected := "Hi, I'm Jack"
greeting := sayHi()
if greeting != expected {
t.Errorf("Greeting was incorrect, got: '%s', want: '%s'", greeting, expected)
}
}