From 295237bb438a2fa765e1382523441235592ea0c2 Mon Sep 17 00:00:00 2001 From: Mat Ryer Date: Fri, 7 Jul 2017 15:13:33 +0100 Subject: [PATCH] fixed broken test after changes --- package/moq/moq_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package/moq/moq_test.go b/package/moq/moq_test.go index fc435b3..cb77a1c 100644 --- a/package/moq/moq_test.go +++ b/package/moq/moq_test.go @@ -2,7 +2,6 @@ package moq import ( "bytes" - "log" "strings" "testing" ) @@ -28,16 +27,16 @@ func TestMoq(t *testing.T) { "func (mock *PersonStoreMock) Get(ctx context.Context, id string) (*Person, error)", "panic(\"moq: PersonStoreMock.CreateFunc is nil but was just called\")", "panic(\"moq: PersonStoreMock.GetFunc is nil but was just called\")", - "CallsTo struct {", - "atomic.AddUint64(&mock.CallsTo.Get, 1)", - "ClearCache uint64", + "mock.CallsTo.lockGet.Lock()", + "mock.CallsTo.Get = append(mock.CallsTo.Get, struct{", + "mock.CallsTo.lockGet.Unlock()", } for _, str := range strs { if !strings.Contains(s, str) { t.Errorf("expected but missing: \"%s\"", str) } } - log.Println(s) + } func TestMoqExplicitPackage(t *testing.T) {