fixed broken test after changes

This commit is contained in:
Mat Ryer 2017-07-07 15:13:33 +01:00
parent 000d593524
commit 295237bb43

View File

@ -2,7 +2,6 @@ package moq
import ( import (
"bytes" "bytes"
"log"
"strings" "strings"
"testing" "testing"
) )
@ -28,16 +27,16 @@ func TestMoq(t *testing.T) {
"func (mock *PersonStoreMock) Get(ctx context.Context, id string) (*Person, error)", "func (mock *PersonStoreMock) Get(ctx context.Context, id string) (*Person, error)",
"panic(\"moq: PersonStoreMock.CreateFunc is nil but was just called\")", "panic(\"moq: PersonStoreMock.CreateFunc is nil but was just called\")",
"panic(\"moq: PersonStoreMock.GetFunc is nil but was just called\")", "panic(\"moq: PersonStoreMock.GetFunc is nil but was just called\")",
"CallsTo struct {", "mock.CallsTo.lockGet.Lock()",
"atomic.AddUint64(&mock.CallsTo.Get, 1)", "mock.CallsTo.Get = append(mock.CallsTo.Get, struct{",
"ClearCache uint64", "mock.CallsTo.lockGet.Unlock()",
} }
for _, str := range strs { for _, str := range strs {
if !strings.Contains(s, str) { if !strings.Contains(s, str) {
t.Errorf("expected but missing: \"%s\"", str) t.Errorf("expected but missing: \"%s\"", str)
} }
} }
log.Println(s)
} }
func TestMoqExplicitPackage(t *testing.T) { func TestMoqExplicitPackage(t *testing.T) {