hellogomod/hello/hello_test.go
Yuki 8af8fe0979
feat: Add more packages.
There are two packages in the module.
2025-06-14 11:41:04 +08:00

22 lines
320 B
Go

package hellogomod
import "testing"
func TestSayHi(t *testing.T) {
s := SayHi("yuki")
want := "Hi, yuki!"
if s != want {
t.Errorf("return %s, want %s", s, want)
}
}
func TestSayHello(t *testing.T) {
s := SayHello("yuki")
want := "Hello, yuki!"
if s != want {
t.Errorf("return %s, want %s", s, want)
}
}