calculator

package
v0.0.0-...-10ffd4c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package calculator is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calculator

type Calculator struct {
	// contains filtered or unexported fields
}

Calculator 是计算器结构体

func (*Calculator) Add

func (c *Calculator) Add(a, b int) int

Add return sum of a and b

func (*Calculator) Sub

func (c *Calculator) Sub(a []int, b *int) int

Sub return

type Math

type Math interface {
	Add(int, int) int
	Sub([]int, *int) int
}

Math interface define add and sub operation

type MockMath

type MockMath struct {
	// contains filtered or unexported fields
}

MockMath is a mock of Math interface

func NewMockMath

func NewMockMath(ctrl *gomock.Controller) *MockMath

NewMockMath creates a new mock instance

func (*MockMath) Add

func (m *MockMath) Add(arg0, arg1 int) int

Add mocks base method

func (*MockMath) EXPECT

func (m *MockMath) EXPECT() *MockMathMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockMath) Sub

func (m *MockMath) Sub(arg0 []int, arg1 *int) int

Sub mocks base method

type MockMathMockRecorder

type MockMathMockRecorder struct {
	// contains filtered or unexported fields
}

MockMathMockRecorder is the mock recorder for MockMath

func (*MockMathMockRecorder) Add

func (mr *MockMathMockRecorder) Add(arg0, arg1 interface{}) *gomock.Call

Add indicates an expected call of Add

func (*MockMathMockRecorder) Sub

func (mr *MockMathMockRecorder) Sub(arg0, arg1 interface{}) *gomock.Call

Sub indicates an expected call of Sub

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL