From 345898142bc2be9d5e40658cb43150a5e555aff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Jime=CC=81nez?= Date: Mon, 29 May 2017 13:05:59 +0100 Subject: [PATCH] Run go vet in travis --- .travis.govet.sh | 10 ++++++++++ .travis.yml | 1 + mock/mock_test.go | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100755 .travis.govet.sh diff --git a/.travis.govet.sh b/.travis.govet.sh new file mode 100755 index 0000000..f8fbba7 --- /dev/null +++ b/.travis.govet.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +cd "$(dirname $0)" +DIRS=". assert require mock _codegen" +set -e +for subdir in $DIRS; do + pushd $subdir + go vet + popd +done diff --git a/.travis.yml b/.travis.yml index c64ce51..7605896 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,5 @@ go: script: - ./.travis.gofmt.sh + - ./.travis.govet.sh - go test -v ./... diff --git a/mock/mock_test.go b/mock/mock_test.go index a681623..676cb29 100644 --- a/mock/mock_test.go +++ b/mock/mock_test.go @@ -754,7 +754,7 @@ func Test_AssertExpectationsForObjects_Helper(t *testing.T) { mockedService2.Called(2) mockedService3.Called(3) - assert.True(t, AssertExpectationsForObjects(t, mockedService1.Mock, mockedService2.Mock, mockedService3.Mock)) + assert.True(t, AssertExpectationsForObjects(t, &mockedService1.Mock, &mockedService2.Mock, &mockedService3.Mock)) assert.True(t, AssertExpectationsForObjects(t, mockedService1, mockedService2, mockedService3)) } @@ -773,7 +773,7 @@ func Test_AssertExpectationsForObjects_Helper_Failed(t *testing.T) { mockedService3.Called(3) tt := new(testing.T) - assert.False(t, AssertExpectationsForObjects(tt, mockedService1.Mock, mockedService2.Mock, mockedService3.Mock)) + assert.False(t, AssertExpectationsForObjects(tt, &mockedService1.Mock, &mockedService2.Mock, &mockedService3.Mock)) assert.False(t, AssertExpectationsForObjects(tt, mockedService1, mockedService2, mockedService3)) }