1package foo 2 3import "testing" 4 5func TestFoo(t *testing.T) { 6 x := foo() 7 if x != 42 { 8 t.Errorf("got %d; want %d", x, 42) 9 } 10} 11