From 621e49bb465f500cc46d47e39e828cf76d6381d7 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 24 Jul 2018 14:35:44 +0200 Subject: update vendor --- .../mock/mockgen/tests/import_source/Readme.md | 3 ++ .../tests/import_source/definition/source.go | 9 +++++ .../tests/import_source/definition/source_mock.go | 43 +++++++++++++++++++++ .../mockgen/tests/import_source/source_mock.go | 44 ++++++++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 vendor/github.com/golang/mock/mockgen/tests/import_source/Readme.md create mode 100644 vendor/github.com/golang/mock/mockgen/tests/import_source/definition/source.go create mode 100644 vendor/github.com/golang/mock/mockgen/tests/import_source/definition/source_mock.go create mode 100644 vendor/github.com/golang/mock/mockgen/tests/import_source/source_mock.go (limited to 'vendor/github.com/golang/mock/mockgen/tests/import_source') diff --git a/vendor/github.com/golang/mock/mockgen/tests/import_source/Readme.md b/vendor/github.com/golang/mock/mockgen/tests/import_source/Readme.md new file mode 100644 index 0000000..b755968 --- /dev/null +++ b/vendor/github.com/golang/mock/mockgen/tests/import_source/Readme.md @@ -0,0 +1,3 @@ +Test the case where the generated code uses a type defined in the source package (in source mode). There are two test cases: +- the output is in a new package +- the output is in the same package as the input \ No newline at end of file diff --git a/vendor/github.com/golang/mock/mockgen/tests/import_source/definition/source.go b/vendor/github.com/golang/mock/mockgen/tests/import_source/definition/source.go new file mode 100644 index 0000000..493134d --- /dev/null +++ b/vendor/github.com/golang/mock/mockgen/tests/import_source/definition/source.go @@ -0,0 +1,9 @@ +//go:generate mockgen -destination ../source_mock.go -source=source.go +//go:generate mockgen -package source -destination source_mock.go -source=source.go +package source + +type X struct{} + +type S interface { + F(X) +} diff --git a/vendor/github.com/golang/mock/mockgen/tests/import_source/definition/source_mock.go b/vendor/github.com/golang/mock/mockgen/tests/import_source/definition/source_mock.go new file mode 100644 index 0000000..e8c9996 --- /dev/null +++ b/vendor/github.com/golang/mock/mockgen/tests/import_source/definition/source_mock.go @@ -0,0 +1,43 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: source.go + +// Package source is a generated GoMock package. +package source + +import ( + gomock "github.com/golang/mock/gomock" + reflect "reflect" +) + +// MockS is a mock of S interface +type MockS struct { + ctrl *gomock.Controller + recorder *MockSMockRecorder +} + +// MockSMockRecorder is the mock recorder for MockS +type MockSMockRecorder struct { + mock *MockS +} + +// NewMockS creates a new mock instance +func NewMockS(ctrl *gomock.Controller) *MockS { + mock := &MockS{ctrl: ctrl} + mock.recorder = &MockSMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockS) EXPECT() *MockSMockRecorder { + return m.recorder +} + +// F mocks base method +func (m *MockS) F(arg0 X) { + m.ctrl.Call(m, "F", arg0) +} + +// F indicates an expected call of F +func (mr *MockSMockRecorder) F(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "F", reflect.TypeOf((*MockS)(nil).F), arg0) +} diff --git a/vendor/github.com/golang/mock/mockgen/tests/import_source/source_mock.go b/vendor/github.com/golang/mock/mockgen/tests/import_source/source_mock.go new file mode 100644 index 0000000..6789ba3 --- /dev/null +++ b/vendor/github.com/golang/mock/mockgen/tests/import_source/source_mock.go @@ -0,0 +1,44 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: source.go + +// Package mock_source is a generated GoMock package. +package mock_source + +import ( + gomock "github.com/golang/mock/gomock" + definition "github.com/golang/mock/mockgen/tests/import_source/definition" + reflect "reflect" +) + +// MockS is a mock of S interface +type MockS struct { + ctrl *gomock.Controller + recorder *MockSMockRecorder +} + +// MockSMockRecorder is the mock recorder for MockS +type MockSMockRecorder struct { + mock *MockS +} + +// NewMockS creates a new mock instance +func NewMockS(ctrl *gomock.Controller) *MockS { + mock := &MockS{ctrl: ctrl} + mock.recorder = &MockSMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockS) EXPECT() *MockSMockRecorder { + return m.recorder +} + +// F mocks base method +func (m *MockS) F(arg0 definition.X) { + m.ctrl.Call(m, "F", arg0) +} + +// F indicates an expected call of F +func (mr *MockSMockRecorder) F(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "F", reflect.TypeOf((*MockS)(nil).F), arg0) +} -- cgit v1.2.3