File: greet_test.go
package learn
import "testing"
func TestGreet(t *testing.T) {
var got string
exp := "Hi, World!"
if got != exp {
t.Errorf("Expected %q, got %q", exp, got)
}
}
- Prototype within
greet_test.go
- Add the ability to greet anyone and then in different languages.
- Finally move the code into it's own file.