hellogomod/hello_test.go
Yuki c378329803
feat: Add SayHi.
Add a new function(lib upgrade).
2025-06-14 00:50:38 +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)
}
}