Compare commits
No commits in common. "5d3d962614e152b11aa8080d6de7b12445bf09a1" and "e7d0d3b2981d7c112a1a7f2a29624f56676e552c" have entirely different histories.
5d3d962614
...
e7d0d3b298
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@ -13,14 +13,14 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest,macos-latest,windows-latest]
|
os: [ubuntu-latest]
|
||||||
go-version: [1.14.x, 1.15.x, 1.17.x, 1.18.x]
|
go-version: [1.14.x, 1.15.x]
|
||||||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-new-combinations
|
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-new-combinations
|
||||||
exclude:
|
include:
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
go-version: 1.14.x
|
go-version: 1.15.x
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
go-version: 1.14.x
|
go-version: 1.15.x
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
|
@ -20,8 +20,6 @@ archives:
|
|||||||
windows: Windows
|
windows: Windows
|
||||||
386: i386
|
386: i386
|
||||||
amd64: x86_64
|
amd64: x86_64
|
||||||
universal_binaries:
|
|
||||||
- replace: false
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
snapshot:
|
snapshot:
|
||||||
|
2
go.mod
2
go.mod
@ -4,5 +4,5 @@ go 1.14
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/pmezard/go-difflib v1.0.0
|
github.com/pmezard/go-difflib v1.0.0
|
||||||
golang.org/x/tools v0.1.10
|
golang.org/x/tools v0.0.0-20200815165600-90abf76919f3
|
||||||
)
|
)
|
||||||
|
35
go.sum
35
go.sum
@ -1,31 +1,24 @@
|
|||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
|
||||||
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
|
|
||||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20=
|
golang.org/x/tools v0.0.0-20200815165600-90abf76919f3 h1:0aScV/0rLmANzEYIhjCOi2pTvDyhZNduBUMD2q3iqs4=
|
||||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
@ -169,7 +169,7 @@ func parseImportsAliases(pkg *packages.Package) map[string]string {
|
|||||||
aliases := make(map[string]string)
|
aliases := make(map[string]string)
|
||||||
for _, syntax := range pkg.Syntax {
|
for _, syntax := range pkg.Syntax {
|
||||||
for _, imprt := range syntax.Imports {
|
for _, imprt := range syntax.Imports {
|
||||||
if imprt.Name != nil && imprt.Name.Name != "." && imprt.Name.Name != "_" {
|
if imprt.Name != nil && imprt.Name.Name != "." {
|
||||||
aliases[strings.Trim(imprt.Path.Value, `"`)] = imprt.Name.Name
|
aliases[strings.Trim(imprt.Path.Value, `"`)] = imprt.Name.Name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,12 +49,7 @@ func varName(vr *types.Var, suffix string) string {
|
|||||||
switch name {
|
switch name {
|
||||||
case "mock", "callInfo", "break", "default", "func", "interface", "select", "case", "defer", "go", "map", "struct",
|
case "mock", "callInfo", "break", "default", "func", "interface", "select", "case", "defer", "go", "map", "struct",
|
||||||
"chan", "else", "goto", "package", "switch", "const", "fallthrough", "if", "range", "type", "continue", "for",
|
"chan", "else", "goto", "package", "switch", "const", "fallthrough", "if", "range", "type", "continue", "for",
|
||||||
"import", "return", "var",
|
"import", "return", "var":
|
||||||
// avoid shadowing basic types
|
|
||||||
"string", "bool", "byte", "rune", "uintptr",
|
|
||||||
"int", "int8", "int16", "int32", "int64",
|
|
||||||
"uint", "uint8", "uint16", "uint32", "uint64",
|
|
||||||
"float32", "float64", "complex64", "complex128":
|
|
||||||
name += "MoqParam"
|
name += "MoqParam"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
main.go
10
main.go
@ -22,7 +22,6 @@ type userFlags struct {
|
|||||||
formatter string
|
formatter string
|
||||||
stubImpl bool
|
stubImpl bool
|
||||||
skipEnsure bool
|
skipEnsure bool
|
||||||
remove bool
|
|
||||||
args []string
|
args []string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +35,6 @@ func main() {
|
|||||||
printVersion := flag.Bool("version", false, "show the version for moq")
|
printVersion := flag.Bool("version", false, "show the version for moq")
|
||||||
flag.BoolVar(&flags.skipEnsure, "skip-ensure", false,
|
flag.BoolVar(&flags.skipEnsure, "skip-ensure", false,
|
||||||
"suppress mock implementation check, avoid import cycle if mocks generated outside of the tested package")
|
"suppress mock implementation check, avoid import cycle if mocks generated outside of the tested package")
|
||||||
flag.BoolVar(&flags.remove, "rm", false, "first remove output file, if it exists")
|
|
||||||
|
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
fmt.Println(`moq [flags] source-dir interface [interface2 [interface3 [...]]]`)
|
fmt.Println(`moq [flags] source-dir interface [interface2 [interface3 [...]]]`)
|
||||||
@ -65,14 +63,6 @@ func run(flags userFlags) error {
|
|||||||
return errors.New("not enough arguments")
|
return errors.New("not enough arguments")
|
||||||
}
|
}
|
||||||
|
|
||||||
if flags.remove && flags.outFile != "" {
|
|
||||||
if err := os.Remove(flags.outFile); err != nil {
|
|
||||||
if !errors.Is(err, os.ErrNotExist) {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
var out io.Writer = os.Stdout
|
var out io.Writer = os.Stdout
|
||||||
if flags.outFile != "" {
|
if flags.outFile != "" {
|
||||||
|
@ -370,19 +370,6 @@ func TestMockGolden(t *testing.T) {
|
|||||||
interfaces: []string{"Syncer"},
|
interfaces: []string{"Syncer"},
|
||||||
goldenFile: filepath.Join("testpackages/syncimport", "syncer_moq.golden.go"),
|
goldenFile: filepath.Join("testpackages/syncimport", "syncer_moq.golden.go"),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
// Tests anonymous imports are not included in the generated mock.
|
|
||||||
name: "AnonymousImport",
|
|
||||||
cfg: Config{SrcDir: "testpackages/anonimport"},
|
|
||||||
interfaces: []string{"Example"},
|
|
||||||
goldenFile: filepath.Join("testpackages/anonimport", "iface_moq.golden.go"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "ShadowTypes",
|
|
||||||
cfg: Config{SrcDir: "testpackages/shadowtypes"},
|
|
||||||
interfaces: []string{"ShadowTypes"},
|
|
||||||
goldenFile: filepath.Join("testpackages/shadowtypes", "shadowtypes_moq.golden.go"),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
for _, tc := range cases {
|
for _, tc := range cases {
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
package anonimport
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Example interface {
|
|
||||||
Ctx(ctx context.Context)
|
|
||||||
}
|
|
@ -1,74 +0,0 @@
|
|||||||
// Code generated by moq; DO NOT EDIT.
|
|
||||||
// github.com/matryer/moq
|
|
||||||
|
|
||||||
package anonimport
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"sync"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Ensure, that ExampleMock does implement Example.
|
|
||||||
// If this is not the case, regenerate this file with moq.
|
|
||||||
var _ Example = &ExampleMock{}
|
|
||||||
|
|
||||||
// ExampleMock is a mock implementation of Example.
|
|
||||||
//
|
|
||||||
// func TestSomethingThatUsesExample(t *testing.T) {
|
|
||||||
//
|
|
||||||
// // make and configure a mocked Example
|
|
||||||
// mockedExample := &ExampleMock{
|
|
||||||
// CtxFunc: func(ctx context.Context) {
|
|
||||||
// panic("mock out the Ctx method")
|
|
||||||
// },
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // use mockedExample in code that requires Example
|
|
||||||
// // and then make assertions.
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
type ExampleMock struct {
|
|
||||||
// CtxFunc mocks the Ctx method.
|
|
||||||
CtxFunc func(ctx context.Context)
|
|
||||||
|
|
||||||
// calls tracks calls to the methods.
|
|
||||||
calls struct {
|
|
||||||
// Ctx holds details about calls to the Ctx method.
|
|
||||||
Ctx []struct {
|
|
||||||
// Ctx is the ctx argument value.
|
|
||||||
Ctx context.Context
|
|
||||||
}
|
|
||||||
}
|
|
||||||
lockCtx sync.RWMutex
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ctx calls CtxFunc.
|
|
||||||
func (mock *ExampleMock) Ctx(ctx context.Context) {
|
|
||||||
if mock.CtxFunc == nil {
|
|
||||||
panic("ExampleMock.CtxFunc: method is nil but Example.Ctx was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
Ctx context.Context
|
|
||||||
}{
|
|
||||||
Ctx: ctx,
|
|
||||||
}
|
|
||||||
mock.lockCtx.Lock()
|
|
||||||
mock.calls.Ctx = append(mock.calls.Ctx, callInfo)
|
|
||||||
mock.lockCtx.Unlock()
|
|
||||||
mock.CtxFunc(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CtxCalls gets all the calls that were made to Ctx.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedExample.CtxCalls())
|
|
||||||
func (mock *ExampleMock) CtxCalls() []struct {
|
|
||||||
Ctx context.Context
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
Ctx context.Context
|
|
||||||
}
|
|
||||||
mock.lockCtx.RLock()
|
|
||||||
calls = mock.calls.Ctx
|
|
||||||
mock.lockCtx.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
package anonimport
|
|
||||||
|
|
||||||
import (
|
|
||||||
_ "context"
|
|
||||||
)
|
|
@ -1,35 +0,0 @@
|
|||||||
package shadowtypes
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/matryer/moq/pkg/moq/testpackages/shadowtypes/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
type ShadowTypes interface {
|
|
||||||
ShadowString(string, types.String)
|
|
||||||
|
|
||||||
ShadowInt(int, types.Int)
|
|
||||||
ShadowInt8(int8, types.Int8)
|
|
||||||
ShadowInt16(int16, types.Int16)
|
|
||||||
ShadowInt32(int32, types.Int32)
|
|
||||||
ShadowInt64(int64, types.Int64)
|
|
||||||
|
|
||||||
ShadowUint(uint, types.Uint)
|
|
||||||
ShadowUint8(uint8, types.Uint8)
|
|
||||||
ShadowUint16(uint16, types.Uint16)
|
|
||||||
ShadowUint32(uint32, types.Uint32)
|
|
||||||
ShadowUint64(uint64, types.Uint64)
|
|
||||||
|
|
||||||
ShadowFloat32(float32, types.Float32)
|
|
||||||
ShadowFloat64(float64, types.Float64)
|
|
||||||
|
|
||||||
ShadowByte(byte, types.Byte)
|
|
||||||
|
|
||||||
ShadowRune(rune, types.Rune)
|
|
||||||
|
|
||||||
ShadowBool(bool, types.Bool)
|
|
||||||
|
|
||||||
ShadowComplex64(complex64, types.Complex64)
|
|
||||||
ShadowComplex128(complex128, types.Complex128)
|
|
||||||
|
|
||||||
ShadowUintptr(uintptr, types.Uintptr)
|
|
||||||
}
|
|
@ -1,962 +0,0 @@
|
|||||||
// Code generated by moq; DO NOT EDIT.
|
|
||||||
// github.com/matryer/moq
|
|
||||||
|
|
||||||
package shadowtypes
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/matryer/moq/pkg/moq/testpackages/shadowtypes/types"
|
|
||||||
"sync"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Ensure, that ShadowTypesMock does implement ShadowTypes.
|
|
||||||
// If this is not the case, regenerate this file with moq.
|
|
||||||
var _ ShadowTypes = &ShadowTypesMock{}
|
|
||||||
|
|
||||||
// ShadowTypesMock is a mock implementation of ShadowTypes.
|
|
||||||
//
|
|
||||||
// func TestSomethingThatUsesShadowTypes(t *testing.T) {
|
|
||||||
//
|
|
||||||
// // make and configure a mocked ShadowTypes
|
|
||||||
// mockedShadowTypes := &ShadowTypesMock{
|
|
||||||
// ShadowBoolFunc: func(b bool, boolMoqParam types.Bool) {
|
|
||||||
// panic("mock out the ShadowBool method")
|
|
||||||
// },
|
|
||||||
// ShadowByteFunc: func(v byte, byteMoqParam types.Byte) {
|
|
||||||
// panic("mock out the ShadowByte method")
|
|
||||||
// },
|
|
||||||
// ShadowComplex128Func: func(v complex128, complex128MoqParam types.Complex128) {
|
|
||||||
// panic("mock out the ShadowComplex128 method")
|
|
||||||
// },
|
|
||||||
// ShadowComplex64Func: func(v complex64, complex64MoqParam types.Complex64) {
|
|
||||||
// panic("mock out the ShadowComplex64 method")
|
|
||||||
// },
|
|
||||||
// ShadowFloat32Func: func(f float32, float32MoqParam types.Float32) {
|
|
||||||
// panic("mock out the ShadowFloat32 method")
|
|
||||||
// },
|
|
||||||
// ShadowFloat64Func: func(f float64, float64MoqParam types.Float64) {
|
|
||||||
// panic("mock out the ShadowFloat64 method")
|
|
||||||
// },
|
|
||||||
// ShadowIntFunc: func(n int, intMoqParam types.Int) {
|
|
||||||
// panic("mock out the ShadowInt method")
|
|
||||||
// },
|
|
||||||
// ShadowInt16Func: func(n int16, int16MoqParam types.Int16) {
|
|
||||||
// panic("mock out the ShadowInt16 method")
|
|
||||||
// },
|
|
||||||
// ShadowInt32Func: func(n int32, int32MoqParam types.Int32) {
|
|
||||||
// panic("mock out the ShadowInt32 method")
|
|
||||||
// },
|
|
||||||
// ShadowInt64Func: func(n int64, int64MoqParam types.Int64) {
|
|
||||||
// panic("mock out the ShadowInt64 method")
|
|
||||||
// },
|
|
||||||
// ShadowInt8Func: func(n int8, int8MoqParam types.Int8) {
|
|
||||||
// panic("mock out the ShadowInt8 method")
|
|
||||||
// },
|
|
||||||
// ShadowRuneFunc: func(n rune, runeMoqParam types.Rune) {
|
|
||||||
// panic("mock out the ShadowRune method")
|
|
||||||
// },
|
|
||||||
// ShadowStringFunc: func(s string, stringMoqParam types.String) {
|
|
||||||
// panic("mock out the ShadowString method")
|
|
||||||
// },
|
|
||||||
// ShadowUintFunc: func(v uint, uintMoqParam types.Uint) {
|
|
||||||
// panic("mock out the ShadowUint method")
|
|
||||||
// },
|
|
||||||
// ShadowUint16Func: func(v uint16, uint16MoqParam types.Uint16) {
|
|
||||||
// panic("mock out the ShadowUint16 method")
|
|
||||||
// },
|
|
||||||
// ShadowUint32Func: func(v uint32, uint32MoqParam types.Uint32) {
|
|
||||||
// panic("mock out the ShadowUint32 method")
|
|
||||||
// },
|
|
||||||
// ShadowUint64Func: func(v uint64, uint64MoqParam types.Uint64) {
|
|
||||||
// panic("mock out the ShadowUint64 method")
|
|
||||||
// },
|
|
||||||
// ShadowUint8Func: func(v uint8, uint8MoqParam types.Uint8) {
|
|
||||||
// panic("mock out the ShadowUint8 method")
|
|
||||||
// },
|
|
||||||
// ShadowUintptrFunc: func(v uintptr, uintptrMoqParam types.Uintptr) {
|
|
||||||
// panic("mock out the ShadowUintptr method")
|
|
||||||
// },
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // use mockedShadowTypes in code that requires ShadowTypes
|
|
||||||
// // and then make assertions.
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
type ShadowTypesMock struct {
|
|
||||||
// ShadowBoolFunc mocks the ShadowBool method.
|
|
||||||
ShadowBoolFunc func(b bool, boolMoqParam types.Bool)
|
|
||||||
|
|
||||||
// ShadowByteFunc mocks the ShadowByte method.
|
|
||||||
ShadowByteFunc func(v byte, byteMoqParam types.Byte)
|
|
||||||
|
|
||||||
// ShadowComplex128Func mocks the ShadowComplex128 method.
|
|
||||||
ShadowComplex128Func func(v complex128, complex128MoqParam types.Complex128)
|
|
||||||
|
|
||||||
// ShadowComplex64Func mocks the ShadowComplex64 method.
|
|
||||||
ShadowComplex64Func func(v complex64, complex64MoqParam types.Complex64)
|
|
||||||
|
|
||||||
// ShadowFloat32Func mocks the ShadowFloat32 method.
|
|
||||||
ShadowFloat32Func func(f float32, float32MoqParam types.Float32)
|
|
||||||
|
|
||||||
// ShadowFloat64Func mocks the ShadowFloat64 method.
|
|
||||||
ShadowFloat64Func func(f float64, float64MoqParam types.Float64)
|
|
||||||
|
|
||||||
// ShadowIntFunc mocks the ShadowInt method.
|
|
||||||
ShadowIntFunc func(n int, intMoqParam types.Int)
|
|
||||||
|
|
||||||
// ShadowInt16Func mocks the ShadowInt16 method.
|
|
||||||
ShadowInt16Func func(n int16, int16MoqParam types.Int16)
|
|
||||||
|
|
||||||
// ShadowInt32Func mocks the ShadowInt32 method.
|
|
||||||
ShadowInt32Func func(n int32, int32MoqParam types.Int32)
|
|
||||||
|
|
||||||
// ShadowInt64Func mocks the ShadowInt64 method.
|
|
||||||
ShadowInt64Func func(n int64, int64MoqParam types.Int64)
|
|
||||||
|
|
||||||
// ShadowInt8Func mocks the ShadowInt8 method.
|
|
||||||
ShadowInt8Func func(n int8, int8MoqParam types.Int8)
|
|
||||||
|
|
||||||
// ShadowRuneFunc mocks the ShadowRune method.
|
|
||||||
ShadowRuneFunc func(n rune, runeMoqParam types.Rune)
|
|
||||||
|
|
||||||
// ShadowStringFunc mocks the ShadowString method.
|
|
||||||
ShadowStringFunc func(s string, stringMoqParam types.String)
|
|
||||||
|
|
||||||
// ShadowUintFunc mocks the ShadowUint method.
|
|
||||||
ShadowUintFunc func(v uint, uintMoqParam types.Uint)
|
|
||||||
|
|
||||||
// ShadowUint16Func mocks the ShadowUint16 method.
|
|
||||||
ShadowUint16Func func(v uint16, uint16MoqParam types.Uint16)
|
|
||||||
|
|
||||||
// ShadowUint32Func mocks the ShadowUint32 method.
|
|
||||||
ShadowUint32Func func(v uint32, uint32MoqParam types.Uint32)
|
|
||||||
|
|
||||||
// ShadowUint64Func mocks the ShadowUint64 method.
|
|
||||||
ShadowUint64Func func(v uint64, uint64MoqParam types.Uint64)
|
|
||||||
|
|
||||||
// ShadowUint8Func mocks the ShadowUint8 method.
|
|
||||||
ShadowUint8Func func(v uint8, uint8MoqParam types.Uint8)
|
|
||||||
|
|
||||||
// ShadowUintptrFunc mocks the ShadowUintptr method.
|
|
||||||
ShadowUintptrFunc func(v uintptr, uintptrMoqParam types.Uintptr)
|
|
||||||
|
|
||||||
// calls tracks calls to the methods.
|
|
||||||
calls struct {
|
|
||||||
// ShadowBool holds details about calls to the ShadowBool method.
|
|
||||||
ShadowBool []struct {
|
|
||||||
// B is the b argument value.
|
|
||||||
B bool
|
|
||||||
// BoolMoqParam is the boolMoqParam argument value.
|
|
||||||
BoolMoqParam types.Bool
|
|
||||||
}
|
|
||||||
// ShadowByte holds details about calls to the ShadowByte method.
|
|
||||||
ShadowByte []struct {
|
|
||||||
// V is the v argument value.
|
|
||||||
V byte
|
|
||||||
// ByteMoqParam is the byteMoqParam argument value.
|
|
||||||
ByteMoqParam types.Byte
|
|
||||||
}
|
|
||||||
// ShadowComplex128 holds details about calls to the ShadowComplex128 method.
|
|
||||||
ShadowComplex128 []struct {
|
|
||||||
// V is the v argument value.
|
|
||||||
V complex128
|
|
||||||
// Complex128MoqParam is the complex128MoqParam argument value.
|
|
||||||
Complex128MoqParam types.Complex128
|
|
||||||
}
|
|
||||||
// ShadowComplex64 holds details about calls to the ShadowComplex64 method.
|
|
||||||
ShadowComplex64 []struct {
|
|
||||||
// V is the v argument value.
|
|
||||||
V complex64
|
|
||||||
// Complex64MoqParam is the complex64MoqParam argument value.
|
|
||||||
Complex64MoqParam types.Complex64
|
|
||||||
}
|
|
||||||
// ShadowFloat32 holds details about calls to the ShadowFloat32 method.
|
|
||||||
ShadowFloat32 []struct {
|
|
||||||
// F is the f argument value.
|
|
||||||
F float32
|
|
||||||
// Float32MoqParam is the float32MoqParam argument value.
|
|
||||||
Float32MoqParam types.Float32
|
|
||||||
}
|
|
||||||
// ShadowFloat64 holds details about calls to the ShadowFloat64 method.
|
|
||||||
ShadowFloat64 []struct {
|
|
||||||
// F is the f argument value.
|
|
||||||
F float64
|
|
||||||
// Float64MoqParam is the float64MoqParam argument value.
|
|
||||||
Float64MoqParam types.Float64
|
|
||||||
}
|
|
||||||
// ShadowInt holds details about calls to the ShadowInt method.
|
|
||||||
ShadowInt []struct {
|
|
||||||
// N is the n argument value.
|
|
||||||
N int
|
|
||||||
// IntMoqParam is the intMoqParam argument value.
|
|
||||||
IntMoqParam types.Int
|
|
||||||
}
|
|
||||||
// ShadowInt16 holds details about calls to the ShadowInt16 method.
|
|
||||||
ShadowInt16 []struct {
|
|
||||||
// N is the n argument value.
|
|
||||||
N int16
|
|
||||||
// Int16MoqParam is the int16MoqParam argument value.
|
|
||||||
Int16MoqParam types.Int16
|
|
||||||
}
|
|
||||||
// ShadowInt32 holds details about calls to the ShadowInt32 method.
|
|
||||||
ShadowInt32 []struct {
|
|
||||||
// N is the n argument value.
|
|
||||||
N int32
|
|
||||||
// Int32MoqParam is the int32MoqParam argument value.
|
|
||||||
Int32MoqParam types.Int32
|
|
||||||
}
|
|
||||||
// ShadowInt64 holds details about calls to the ShadowInt64 method.
|
|
||||||
ShadowInt64 []struct {
|
|
||||||
// N is the n argument value.
|
|
||||||
N int64
|
|
||||||
// Int64MoqParam is the int64MoqParam argument value.
|
|
||||||
Int64MoqParam types.Int64
|
|
||||||
}
|
|
||||||
// ShadowInt8 holds details about calls to the ShadowInt8 method.
|
|
||||||
ShadowInt8 []struct {
|
|
||||||
// N is the n argument value.
|
|
||||||
N int8
|
|
||||||
// Int8MoqParam is the int8MoqParam argument value.
|
|
||||||
Int8MoqParam types.Int8
|
|
||||||
}
|
|
||||||
// ShadowRune holds details about calls to the ShadowRune method.
|
|
||||||
ShadowRune []struct {
|
|
||||||
// N is the n argument value.
|
|
||||||
N rune
|
|
||||||
// RuneMoqParam is the runeMoqParam argument value.
|
|
||||||
RuneMoqParam types.Rune
|
|
||||||
}
|
|
||||||
// ShadowString holds details about calls to the ShadowString method.
|
|
||||||
ShadowString []struct {
|
|
||||||
// S is the s argument value.
|
|
||||||
S string
|
|
||||||
// StringMoqParam is the stringMoqParam argument value.
|
|
||||||
StringMoqParam types.String
|
|
||||||
}
|
|
||||||
// ShadowUint holds details about calls to the ShadowUint method.
|
|
||||||
ShadowUint []struct {
|
|
||||||
// V is the v argument value.
|
|
||||||
V uint
|
|
||||||
// UintMoqParam is the uintMoqParam argument value.
|
|
||||||
UintMoqParam types.Uint
|
|
||||||
}
|
|
||||||
// ShadowUint16 holds details about calls to the ShadowUint16 method.
|
|
||||||
ShadowUint16 []struct {
|
|
||||||
// V is the v argument value.
|
|
||||||
V uint16
|
|
||||||
// Uint16MoqParam is the uint16MoqParam argument value.
|
|
||||||
Uint16MoqParam types.Uint16
|
|
||||||
}
|
|
||||||
// ShadowUint32 holds details about calls to the ShadowUint32 method.
|
|
||||||
ShadowUint32 []struct {
|
|
||||||
// V is the v argument value.
|
|
||||||
V uint32
|
|
||||||
// Uint32MoqParam is the uint32MoqParam argument value.
|
|
||||||
Uint32MoqParam types.Uint32
|
|
||||||
}
|
|
||||||
// ShadowUint64 holds details about calls to the ShadowUint64 method.
|
|
||||||
ShadowUint64 []struct {
|
|
||||||
// V is the v argument value.
|
|
||||||
V uint64
|
|
||||||
// Uint64MoqParam is the uint64MoqParam argument value.
|
|
||||||
Uint64MoqParam types.Uint64
|
|
||||||
}
|
|
||||||
// ShadowUint8 holds details about calls to the ShadowUint8 method.
|
|
||||||
ShadowUint8 []struct {
|
|
||||||
// V is the v argument value.
|
|
||||||
V uint8
|
|
||||||
// Uint8MoqParam is the uint8MoqParam argument value.
|
|
||||||
Uint8MoqParam types.Uint8
|
|
||||||
}
|
|
||||||
// ShadowUintptr holds details about calls to the ShadowUintptr method.
|
|
||||||
ShadowUintptr []struct {
|
|
||||||
// V is the v argument value.
|
|
||||||
V uintptr
|
|
||||||
// UintptrMoqParam is the uintptrMoqParam argument value.
|
|
||||||
UintptrMoqParam types.Uintptr
|
|
||||||
}
|
|
||||||
}
|
|
||||||
lockShadowBool sync.RWMutex
|
|
||||||
lockShadowByte sync.RWMutex
|
|
||||||
lockShadowComplex128 sync.RWMutex
|
|
||||||
lockShadowComplex64 sync.RWMutex
|
|
||||||
lockShadowFloat32 sync.RWMutex
|
|
||||||
lockShadowFloat64 sync.RWMutex
|
|
||||||
lockShadowInt sync.RWMutex
|
|
||||||
lockShadowInt16 sync.RWMutex
|
|
||||||
lockShadowInt32 sync.RWMutex
|
|
||||||
lockShadowInt64 sync.RWMutex
|
|
||||||
lockShadowInt8 sync.RWMutex
|
|
||||||
lockShadowRune sync.RWMutex
|
|
||||||
lockShadowString sync.RWMutex
|
|
||||||
lockShadowUint sync.RWMutex
|
|
||||||
lockShadowUint16 sync.RWMutex
|
|
||||||
lockShadowUint32 sync.RWMutex
|
|
||||||
lockShadowUint64 sync.RWMutex
|
|
||||||
lockShadowUint8 sync.RWMutex
|
|
||||||
lockShadowUintptr sync.RWMutex
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowBool calls ShadowBoolFunc.
|
|
||||||
func (mock *ShadowTypesMock) ShadowBool(b bool, boolMoqParam types.Bool) {
|
|
||||||
if mock.ShadowBoolFunc == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowBoolFunc: method is nil but ShadowTypes.ShadowBool was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
B bool
|
|
||||||
BoolMoqParam types.Bool
|
|
||||||
}{
|
|
||||||
B: b,
|
|
||||||
BoolMoqParam: boolMoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowBool.Lock()
|
|
||||||
mock.calls.ShadowBool = append(mock.calls.ShadowBool, callInfo)
|
|
||||||
mock.lockShadowBool.Unlock()
|
|
||||||
mock.ShadowBoolFunc(b, boolMoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowBoolCalls gets all the calls that were made to ShadowBool.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowBoolCalls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowBoolCalls() []struct {
|
|
||||||
B bool
|
|
||||||
BoolMoqParam types.Bool
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
B bool
|
|
||||||
BoolMoqParam types.Bool
|
|
||||||
}
|
|
||||||
mock.lockShadowBool.RLock()
|
|
||||||
calls = mock.calls.ShadowBool
|
|
||||||
mock.lockShadowBool.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowByte calls ShadowByteFunc.
|
|
||||||
func (mock *ShadowTypesMock) ShadowByte(v byte, byteMoqParam types.Byte) {
|
|
||||||
if mock.ShadowByteFunc == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowByteFunc: method is nil but ShadowTypes.ShadowByte was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
V byte
|
|
||||||
ByteMoqParam types.Byte
|
|
||||||
}{
|
|
||||||
V: v,
|
|
||||||
ByteMoqParam: byteMoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowByte.Lock()
|
|
||||||
mock.calls.ShadowByte = append(mock.calls.ShadowByte, callInfo)
|
|
||||||
mock.lockShadowByte.Unlock()
|
|
||||||
mock.ShadowByteFunc(v, byteMoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowByteCalls gets all the calls that were made to ShadowByte.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowByteCalls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowByteCalls() []struct {
|
|
||||||
V byte
|
|
||||||
ByteMoqParam types.Byte
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
V byte
|
|
||||||
ByteMoqParam types.Byte
|
|
||||||
}
|
|
||||||
mock.lockShadowByte.RLock()
|
|
||||||
calls = mock.calls.ShadowByte
|
|
||||||
mock.lockShadowByte.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowComplex128 calls ShadowComplex128Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowComplex128(v complex128, complex128MoqParam types.Complex128) {
|
|
||||||
if mock.ShadowComplex128Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowComplex128Func: method is nil but ShadowTypes.ShadowComplex128 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
V complex128
|
|
||||||
Complex128MoqParam types.Complex128
|
|
||||||
}{
|
|
||||||
V: v,
|
|
||||||
Complex128MoqParam: complex128MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowComplex128.Lock()
|
|
||||||
mock.calls.ShadowComplex128 = append(mock.calls.ShadowComplex128, callInfo)
|
|
||||||
mock.lockShadowComplex128.Unlock()
|
|
||||||
mock.ShadowComplex128Func(v, complex128MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowComplex128Calls gets all the calls that were made to ShadowComplex128.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowComplex128Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowComplex128Calls() []struct {
|
|
||||||
V complex128
|
|
||||||
Complex128MoqParam types.Complex128
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
V complex128
|
|
||||||
Complex128MoqParam types.Complex128
|
|
||||||
}
|
|
||||||
mock.lockShadowComplex128.RLock()
|
|
||||||
calls = mock.calls.ShadowComplex128
|
|
||||||
mock.lockShadowComplex128.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowComplex64 calls ShadowComplex64Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowComplex64(v complex64, complex64MoqParam types.Complex64) {
|
|
||||||
if mock.ShadowComplex64Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowComplex64Func: method is nil but ShadowTypes.ShadowComplex64 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
V complex64
|
|
||||||
Complex64MoqParam types.Complex64
|
|
||||||
}{
|
|
||||||
V: v,
|
|
||||||
Complex64MoqParam: complex64MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowComplex64.Lock()
|
|
||||||
mock.calls.ShadowComplex64 = append(mock.calls.ShadowComplex64, callInfo)
|
|
||||||
mock.lockShadowComplex64.Unlock()
|
|
||||||
mock.ShadowComplex64Func(v, complex64MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowComplex64Calls gets all the calls that were made to ShadowComplex64.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowComplex64Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowComplex64Calls() []struct {
|
|
||||||
V complex64
|
|
||||||
Complex64MoqParam types.Complex64
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
V complex64
|
|
||||||
Complex64MoqParam types.Complex64
|
|
||||||
}
|
|
||||||
mock.lockShadowComplex64.RLock()
|
|
||||||
calls = mock.calls.ShadowComplex64
|
|
||||||
mock.lockShadowComplex64.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowFloat32 calls ShadowFloat32Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowFloat32(f float32, float32MoqParam types.Float32) {
|
|
||||||
if mock.ShadowFloat32Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowFloat32Func: method is nil but ShadowTypes.ShadowFloat32 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
F float32
|
|
||||||
Float32MoqParam types.Float32
|
|
||||||
}{
|
|
||||||
F: f,
|
|
||||||
Float32MoqParam: float32MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowFloat32.Lock()
|
|
||||||
mock.calls.ShadowFloat32 = append(mock.calls.ShadowFloat32, callInfo)
|
|
||||||
mock.lockShadowFloat32.Unlock()
|
|
||||||
mock.ShadowFloat32Func(f, float32MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowFloat32Calls gets all the calls that were made to ShadowFloat32.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowFloat32Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowFloat32Calls() []struct {
|
|
||||||
F float32
|
|
||||||
Float32MoqParam types.Float32
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
F float32
|
|
||||||
Float32MoqParam types.Float32
|
|
||||||
}
|
|
||||||
mock.lockShadowFloat32.RLock()
|
|
||||||
calls = mock.calls.ShadowFloat32
|
|
||||||
mock.lockShadowFloat32.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowFloat64 calls ShadowFloat64Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowFloat64(f float64, float64MoqParam types.Float64) {
|
|
||||||
if mock.ShadowFloat64Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowFloat64Func: method is nil but ShadowTypes.ShadowFloat64 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
F float64
|
|
||||||
Float64MoqParam types.Float64
|
|
||||||
}{
|
|
||||||
F: f,
|
|
||||||
Float64MoqParam: float64MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowFloat64.Lock()
|
|
||||||
mock.calls.ShadowFloat64 = append(mock.calls.ShadowFloat64, callInfo)
|
|
||||||
mock.lockShadowFloat64.Unlock()
|
|
||||||
mock.ShadowFloat64Func(f, float64MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowFloat64Calls gets all the calls that were made to ShadowFloat64.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowFloat64Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowFloat64Calls() []struct {
|
|
||||||
F float64
|
|
||||||
Float64MoqParam types.Float64
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
F float64
|
|
||||||
Float64MoqParam types.Float64
|
|
||||||
}
|
|
||||||
mock.lockShadowFloat64.RLock()
|
|
||||||
calls = mock.calls.ShadowFloat64
|
|
||||||
mock.lockShadowFloat64.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowInt calls ShadowIntFunc.
|
|
||||||
func (mock *ShadowTypesMock) ShadowInt(n int, intMoqParam types.Int) {
|
|
||||||
if mock.ShadowIntFunc == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowIntFunc: method is nil but ShadowTypes.ShadowInt was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
N int
|
|
||||||
IntMoqParam types.Int
|
|
||||||
}{
|
|
||||||
N: n,
|
|
||||||
IntMoqParam: intMoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowInt.Lock()
|
|
||||||
mock.calls.ShadowInt = append(mock.calls.ShadowInt, callInfo)
|
|
||||||
mock.lockShadowInt.Unlock()
|
|
||||||
mock.ShadowIntFunc(n, intMoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowIntCalls gets all the calls that were made to ShadowInt.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowIntCalls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowIntCalls() []struct {
|
|
||||||
N int
|
|
||||||
IntMoqParam types.Int
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
N int
|
|
||||||
IntMoqParam types.Int
|
|
||||||
}
|
|
||||||
mock.lockShadowInt.RLock()
|
|
||||||
calls = mock.calls.ShadowInt
|
|
||||||
mock.lockShadowInt.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowInt16 calls ShadowInt16Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowInt16(n int16, int16MoqParam types.Int16) {
|
|
||||||
if mock.ShadowInt16Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowInt16Func: method is nil but ShadowTypes.ShadowInt16 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
N int16
|
|
||||||
Int16MoqParam types.Int16
|
|
||||||
}{
|
|
||||||
N: n,
|
|
||||||
Int16MoqParam: int16MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowInt16.Lock()
|
|
||||||
mock.calls.ShadowInt16 = append(mock.calls.ShadowInt16, callInfo)
|
|
||||||
mock.lockShadowInt16.Unlock()
|
|
||||||
mock.ShadowInt16Func(n, int16MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowInt16Calls gets all the calls that were made to ShadowInt16.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowInt16Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowInt16Calls() []struct {
|
|
||||||
N int16
|
|
||||||
Int16MoqParam types.Int16
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
N int16
|
|
||||||
Int16MoqParam types.Int16
|
|
||||||
}
|
|
||||||
mock.lockShadowInt16.RLock()
|
|
||||||
calls = mock.calls.ShadowInt16
|
|
||||||
mock.lockShadowInt16.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowInt32 calls ShadowInt32Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowInt32(n int32, int32MoqParam types.Int32) {
|
|
||||||
if mock.ShadowInt32Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowInt32Func: method is nil but ShadowTypes.ShadowInt32 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
N int32
|
|
||||||
Int32MoqParam types.Int32
|
|
||||||
}{
|
|
||||||
N: n,
|
|
||||||
Int32MoqParam: int32MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowInt32.Lock()
|
|
||||||
mock.calls.ShadowInt32 = append(mock.calls.ShadowInt32, callInfo)
|
|
||||||
mock.lockShadowInt32.Unlock()
|
|
||||||
mock.ShadowInt32Func(n, int32MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowInt32Calls gets all the calls that were made to ShadowInt32.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowInt32Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowInt32Calls() []struct {
|
|
||||||
N int32
|
|
||||||
Int32MoqParam types.Int32
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
N int32
|
|
||||||
Int32MoqParam types.Int32
|
|
||||||
}
|
|
||||||
mock.lockShadowInt32.RLock()
|
|
||||||
calls = mock.calls.ShadowInt32
|
|
||||||
mock.lockShadowInt32.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowInt64 calls ShadowInt64Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowInt64(n int64, int64MoqParam types.Int64) {
|
|
||||||
if mock.ShadowInt64Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowInt64Func: method is nil but ShadowTypes.ShadowInt64 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
N int64
|
|
||||||
Int64MoqParam types.Int64
|
|
||||||
}{
|
|
||||||
N: n,
|
|
||||||
Int64MoqParam: int64MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowInt64.Lock()
|
|
||||||
mock.calls.ShadowInt64 = append(mock.calls.ShadowInt64, callInfo)
|
|
||||||
mock.lockShadowInt64.Unlock()
|
|
||||||
mock.ShadowInt64Func(n, int64MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowInt64Calls gets all the calls that were made to ShadowInt64.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowInt64Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowInt64Calls() []struct {
|
|
||||||
N int64
|
|
||||||
Int64MoqParam types.Int64
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
N int64
|
|
||||||
Int64MoqParam types.Int64
|
|
||||||
}
|
|
||||||
mock.lockShadowInt64.RLock()
|
|
||||||
calls = mock.calls.ShadowInt64
|
|
||||||
mock.lockShadowInt64.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowInt8 calls ShadowInt8Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowInt8(n int8, int8MoqParam types.Int8) {
|
|
||||||
if mock.ShadowInt8Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowInt8Func: method is nil but ShadowTypes.ShadowInt8 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
N int8
|
|
||||||
Int8MoqParam types.Int8
|
|
||||||
}{
|
|
||||||
N: n,
|
|
||||||
Int8MoqParam: int8MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowInt8.Lock()
|
|
||||||
mock.calls.ShadowInt8 = append(mock.calls.ShadowInt8, callInfo)
|
|
||||||
mock.lockShadowInt8.Unlock()
|
|
||||||
mock.ShadowInt8Func(n, int8MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowInt8Calls gets all the calls that were made to ShadowInt8.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowInt8Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowInt8Calls() []struct {
|
|
||||||
N int8
|
|
||||||
Int8MoqParam types.Int8
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
N int8
|
|
||||||
Int8MoqParam types.Int8
|
|
||||||
}
|
|
||||||
mock.lockShadowInt8.RLock()
|
|
||||||
calls = mock.calls.ShadowInt8
|
|
||||||
mock.lockShadowInt8.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowRune calls ShadowRuneFunc.
|
|
||||||
func (mock *ShadowTypesMock) ShadowRune(n rune, runeMoqParam types.Rune) {
|
|
||||||
if mock.ShadowRuneFunc == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowRuneFunc: method is nil but ShadowTypes.ShadowRune was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
N rune
|
|
||||||
RuneMoqParam types.Rune
|
|
||||||
}{
|
|
||||||
N: n,
|
|
||||||
RuneMoqParam: runeMoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowRune.Lock()
|
|
||||||
mock.calls.ShadowRune = append(mock.calls.ShadowRune, callInfo)
|
|
||||||
mock.lockShadowRune.Unlock()
|
|
||||||
mock.ShadowRuneFunc(n, runeMoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowRuneCalls gets all the calls that were made to ShadowRune.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowRuneCalls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowRuneCalls() []struct {
|
|
||||||
N rune
|
|
||||||
RuneMoqParam types.Rune
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
N rune
|
|
||||||
RuneMoqParam types.Rune
|
|
||||||
}
|
|
||||||
mock.lockShadowRune.RLock()
|
|
||||||
calls = mock.calls.ShadowRune
|
|
||||||
mock.lockShadowRune.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowString calls ShadowStringFunc.
|
|
||||||
func (mock *ShadowTypesMock) ShadowString(s string, stringMoqParam types.String) {
|
|
||||||
if mock.ShadowStringFunc == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowStringFunc: method is nil but ShadowTypes.ShadowString was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
S string
|
|
||||||
StringMoqParam types.String
|
|
||||||
}{
|
|
||||||
S: s,
|
|
||||||
StringMoqParam: stringMoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowString.Lock()
|
|
||||||
mock.calls.ShadowString = append(mock.calls.ShadowString, callInfo)
|
|
||||||
mock.lockShadowString.Unlock()
|
|
||||||
mock.ShadowStringFunc(s, stringMoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowStringCalls gets all the calls that were made to ShadowString.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowStringCalls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowStringCalls() []struct {
|
|
||||||
S string
|
|
||||||
StringMoqParam types.String
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
S string
|
|
||||||
StringMoqParam types.String
|
|
||||||
}
|
|
||||||
mock.lockShadowString.RLock()
|
|
||||||
calls = mock.calls.ShadowString
|
|
||||||
mock.lockShadowString.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUint calls ShadowUintFunc.
|
|
||||||
func (mock *ShadowTypesMock) ShadowUint(v uint, uintMoqParam types.Uint) {
|
|
||||||
if mock.ShadowUintFunc == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowUintFunc: method is nil but ShadowTypes.ShadowUint was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
V uint
|
|
||||||
UintMoqParam types.Uint
|
|
||||||
}{
|
|
||||||
V: v,
|
|
||||||
UintMoqParam: uintMoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowUint.Lock()
|
|
||||||
mock.calls.ShadowUint = append(mock.calls.ShadowUint, callInfo)
|
|
||||||
mock.lockShadowUint.Unlock()
|
|
||||||
mock.ShadowUintFunc(v, uintMoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUintCalls gets all the calls that were made to ShadowUint.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowUintCalls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowUintCalls() []struct {
|
|
||||||
V uint
|
|
||||||
UintMoqParam types.Uint
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
V uint
|
|
||||||
UintMoqParam types.Uint
|
|
||||||
}
|
|
||||||
mock.lockShadowUint.RLock()
|
|
||||||
calls = mock.calls.ShadowUint
|
|
||||||
mock.lockShadowUint.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUint16 calls ShadowUint16Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowUint16(v uint16, uint16MoqParam types.Uint16) {
|
|
||||||
if mock.ShadowUint16Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowUint16Func: method is nil but ShadowTypes.ShadowUint16 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
V uint16
|
|
||||||
Uint16MoqParam types.Uint16
|
|
||||||
}{
|
|
||||||
V: v,
|
|
||||||
Uint16MoqParam: uint16MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowUint16.Lock()
|
|
||||||
mock.calls.ShadowUint16 = append(mock.calls.ShadowUint16, callInfo)
|
|
||||||
mock.lockShadowUint16.Unlock()
|
|
||||||
mock.ShadowUint16Func(v, uint16MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUint16Calls gets all the calls that were made to ShadowUint16.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowUint16Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowUint16Calls() []struct {
|
|
||||||
V uint16
|
|
||||||
Uint16MoqParam types.Uint16
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
V uint16
|
|
||||||
Uint16MoqParam types.Uint16
|
|
||||||
}
|
|
||||||
mock.lockShadowUint16.RLock()
|
|
||||||
calls = mock.calls.ShadowUint16
|
|
||||||
mock.lockShadowUint16.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUint32 calls ShadowUint32Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowUint32(v uint32, uint32MoqParam types.Uint32) {
|
|
||||||
if mock.ShadowUint32Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowUint32Func: method is nil but ShadowTypes.ShadowUint32 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
V uint32
|
|
||||||
Uint32MoqParam types.Uint32
|
|
||||||
}{
|
|
||||||
V: v,
|
|
||||||
Uint32MoqParam: uint32MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowUint32.Lock()
|
|
||||||
mock.calls.ShadowUint32 = append(mock.calls.ShadowUint32, callInfo)
|
|
||||||
mock.lockShadowUint32.Unlock()
|
|
||||||
mock.ShadowUint32Func(v, uint32MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUint32Calls gets all the calls that were made to ShadowUint32.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowUint32Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowUint32Calls() []struct {
|
|
||||||
V uint32
|
|
||||||
Uint32MoqParam types.Uint32
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
V uint32
|
|
||||||
Uint32MoqParam types.Uint32
|
|
||||||
}
|
|
||||||
mock.lockShadowUint32.RLock()
|
|
||||||
calls = mock.calls.ShadowUint32
|
|
||||||
mock.lockShadowUint32.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUint64 calls ShadowUint64Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowUint64(v uint64, uint64MoqParam types.Uint64) {
|
|
||||||
if mock.ShadowUint64Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowUint64Func: method is nil but ShadowTypes.ShadowUint64 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
V uint64
|
|
||||||
Uint64MoqParam types.Uint64
|
|
||||||
}{
|
|
||||||
V: v,
|
|
||||||
Uint64MoqParam: uint64MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowUint64.Lock()
|
|
||||||
mock.calls.ShadowUint64 = append(mock.calls.ShadowUint64, callInfo)
|
|
||||||
mock.lockShadowUint64.Unlock()
|
|
||||||
mock.ShadowUint64Func(v, uint64MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUint64Calls gets all the calls that were made to ShadowUint64.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowUint64Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowUint64Calls() []struct {
|
|
||||||
V uint64
|
|
||||||
Uint64MoqParam types.Uint64
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
V uint64
|
|
||||||
Uint64MoqParam types.Uint64
|
|
||||||
}
|
|
||||||
mock.lockShadowUint64.RLock()
|
|
||||||
calls = mock.calls.ShadowUint64
|
|
||||||
mock.lockShadowUint64.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUint8 calls ShadowUint8Func.
|
|
||||||
func (mock *ShadowTypesMock) ShadowUint8(v uint8, uint8MoqParam types.Uint8) {
|
|
||||||
if mock.ShadowUint8Func == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowUint8Func: method is nil but ShadowTypes.ShadowUint8 was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
V uint8
|
|
||||||
Uint8MoqParam types.Uint8
|
|
||||||
}{
|
|
||||||
V: v,
|
|
||||||
Uint8MoqParam: uint8MoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowUint8.Lock()
|
|
||||||
mock.calls.ShadowUint8 = append(mock.calls.ShadowUint8, callInfo)
|
|
||||||
mock.lockShadowUint8.Unlock()
|
|
||||||
mock.ShadowUint8Func(v, uint8MoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUint8Calls gets all the calls that were made to ShadowUint8.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowUint8Calls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowUint8Calls() []struct {
|
|
||||||
V uint8
|
|
||||||
Uint8MoqParam types.Uint8
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
V uint8
|
|
||||||
Uint8MoqParam types.Uint8
|
|
||||||
}
|
|
||||||
mock.lockShadowUint8.RLock()
|
|
||||||
calls = mock.calls.ShadowUint8
|
|
||||||
mock.lockShadowUint8.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUintptr calls ShadowUintptrFunc.
|
|
||||||
func (mock *ShadowTypesMock) ShadowUintptr(v uintptr, uintptrMoqParam types.Uintptr) {
|
|
||||||
if mock.ShadowUintptrFunc == nil {
|
|
||||||
panic("ShadowTypesMock.ShadowUintptrFunc: method is nil but ShadowTypes.ShadowUintptr was just called")
|
|
||||||
}
|
|
||||||
callInfo := struct {
|
|
||||||
V uintptr
|
|
||||||
UintptrMoqParam types.Uintptr
|
|
||||||
}{
|
|
||||||
V: v,
|
|
||||||
UintptrMoqParam: uintptrMoqParam,
|
|
||||||
}
|
|
||||||
mock.lockShadowUintptr.Lock()
|
|
||||||
mock.calls.ShadowUintptr = append(mock.calls.ShadowUintptr, callInfo)
|
|
||||||
mock.lockShadowUintptr.Unlock()
|
|
||||||
mock.ShadowUintptrFunc(v, uintptrMoqParam)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShadowUintptrCalls gets all the calls that were made to ShadowUintptr.
|
|
||||||
// Check the length with:
|
|
||||||
// len(mockedShadowTypes.ShadowUintptrCalls())
|
|
||||||
func (mock *ShadowTypesMock) ShadowUintptrCalls() []struct {
|
|
||||||
V uintptr
|
|
||||||
UintptrMoqParam types.Uintptr
|
|
||||||
} {
|
|
||||||
var calls []struct {
|
|
||||||
V uintptr
|
|
||||||
UintptrMoqParam types.Uintptr
|
|
||||||
}
|
|
||||||
mock.lockShadowUintptr.RLock()
|
|
||||||
calls = mock.calls.ShadowUintptr
|
|
||||||
mock.lockShadowUintptr.RUnlock()
|
|
||||||
return calls
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
package types
|
|
||||||
|
|
||||||
type String string
|
|
||||||
|
|
||||||
type Int int
|
|
||||||
type Int8 int8
|
|
||||||
type Int16 int16
|
|
||||||
type Int32 int32
|
|
||||||
type Int64 int64
|
|
||||||
|
|
||||||
type Uint uint
|
|
||||||
type Uint8 uint
|
|
||||||
type Uint16 uint
|
|
||||||
type Uint32 uint
|
|
||||||
type Uint64 uint
|
|
||||||
|
|
||||||
type Float32 float32
|
|
||||||
type Float64 float64
|
|
||||||
|
|
||||||
type Byte byte
|
|
||||||
|
|
||||||
type Rune rune
|
|
||||||
|
|
||||||
type Bool bool
|
|
||||||
|
|
||||||
type Complex64 complex64
|
|
||||||
type Complex128 complex128
|
|
||||||
|
|
||||||
type Uintptr uintptr
|
|
@ -26,11 +26,3 @@ Then:
|
|||||||
```bash
|
```bash
|
||||||
GITHUB_TOKEN=xxx goreleaser --rm-dist
|
GITHUB_TOKEN=xxx goreleaser --rm-dist
|
||||||
```
|
```
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
To test and verify changes to Go Releaser config, use the following:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
goreleaser --snapshot --skip-publish --rm-dist
|
|
||||||
```
|
|
||||||
|
Loading…
Reference in New Issue
Block a user