blob: 8be1b0babfbe06aa70b48376603a6bb05cf78020 [file]
package main
import (
"bytes"
"strings"
"testing"
)
func TestHello(t *testing.T) {
out := bytes.NewBuffer(nil)
sayHello(out)
got := out.String()
if !strings.Contains(got, "Hello") {
t.Errorf("did not print Hello")
}
}