summaryrefslogtreecommitdiff
path: root/vendor/github.com/golang/mock/mockgen/tests/unexported_method
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/golang/mock/mockgen/tests/unexported_method')
-rw-r--r--vendor/github.com/golang/mock/mockgen/tests/unexported_method/README.md1
-rw-r--r--vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go15
-rw-r--r--vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport_mock.go45
-rw-r--r--vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport_test.go17
4 files changed, 0 insertions, 78 deletions
diff --git a/vendor/github.com/golang/mock/mockgen/tests/unexported_method/README.md b/vendor/github.com/golang/mock/mockgen/tests/unexported_method/README.md
deleted file mode 100644
index 87f91d4..0000000
--- a/vendor/github.com/golang/mock/mockgen/tests/unexported_method/README.md
+++ /dev/null
@@ -1 +0,0 @@
-From #52, this tests an unexported method in the mocked interface.
diff --git a/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go b/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go
deleted file mode 100644
index 91d5baf..0000000
--- a/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go
+++ /dev/null
@@ -1,15 +0,0 @@
-//go:generate mockgen -destination bugreport_mock.go -package bugreport -source=bugreport.go Example
-
-package bugreport
-
-import "fmt"
-
-// Example is an interface with a non exported method
-type Example interface {
- someMethod(string) string
-}
-
-// CallExample is a simple function that uses the interface
-func CallExample(e Example) {
- fmt.Println(e.someMethod("test"))
-}
diff --git a/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport_mock.go b/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport_mock.go
deleted file mode 100644
index 8ba218f..0000000
--- a/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport_mock.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Code generated by MockGen. DO NOT EDIT.
-// Source: bugreport.go
-
-// Package bugreport is a generated GoMock package.
-package bugreport
-
-import (
- gomock "github.com/golang/mock/gomock"
- reflect "reflect"
-)
-
-// MockExample is a mock of Example interface
-type MockExample struct {
- ctrl *gomock.Controller
- recorder *MockExampleMockRecorder
-}
-
-// MockExampleMockRecorder is the mock recorder for MockExample
-type MockExampleMockRecorder struct {
- mock *MockExample
-}
-
-// NewMockExample creates a new mock instance
-func NewMockExample(ctrl *gomock.Controller) *MockExample {
- mock := &MockExample{ctrl: ctrl}
- mock.recorder = &MockExampleMockRecorder{mock}
- return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use
-func (m *MockExample) EXPECT() *MockExampleMockRecorder {
- return m.recorder
-}
-
-// someMethod mocks base method
-func (m *MockExample) someMethod(arg0 string) string {
- ret := m.ctrl.Call(m, "someMethod", arg0)
- ret0, _ := ret[0].(string)
- return ret0
-}
-
-// someMethod indicates an expected call of someMethod
-func (mr *MockExampleMockRecorder) someMethod(arg0 interface{}) *gomock.Call {
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "someMethod", reflect.TypeOf((*MockExample)(nil).someMethod), arg0)
-}
diff --git a/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport_test.go b/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport_test.go
deleted file mode 100644
index d428fb4..0000000
--- a/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport_test.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package bugreport
-
-import (
- "testing"
-
- "github.com/golang/mock/gomock"
-)
-
-func TestCallExample(t *testing.T) {
- ctrl := gomock.NewController(t)
- defer ctrl.Finish()
-
- e := NewMockExample(ctrl)
- e.EXPECT().someMethod(gomock.Any()).Return("it works!")
-
- CallExample(e)
-}