Comments (4)
Sorry, had a bug in the test case. Fixed it up.
from mock.
Ugh, this also occurs with constants called on the recorder that will never change. I'm mocking out a statsd wrapper that always passes 1.0
to a method on the statsd interface that is correctly turned into a float32
in the actual code but the recorder will see it as a float64
.
from mock.
The arg types to Recorder methods are interface{} so that Matcher values may be passed (e.g. gomock.Any()
). That's not possible if the real types are used.
This is just an unfortunate consequence of trying to squeeze this kind of mocking into Go's type system.
from mock.
Of course. How silly of me. Sorry!
from mock.
Related Issues (20)
- Mockgen: Support generating mock for interfaces that contain a generic typed return value HOT 2
- Maintenance status of mockgen HOT 2
- add automation script samples HOT 1
- Generating mocks (reflect mode) fails if interface contains methods with generic types HOT 2
- Generic generation failed without specifying source HOT 1
- How to write the mock result to a file in reflect mode HOT 3
- Proposal: Provide an option where every invocation of `EXPECT()` of a mock should override any previous invocations.
- Snyc Vulnerability High severity golang.org/x/crypto Improper Signature Verification VULNERABILITY
- Unexpected access should print stack trace
- Use of -aux_files causes incorrect generated code in case of embedded interface with package name overlap
- Exact matching on varargs of type interface{}
- Pass if struct contains minimal required parameters HOT 1
- Add builtin custom matcher function HOT 1
- golang.org/x/text generating warning https://github.com/advisories/GHSA-69ch-w2m2-3vjp
- Is this project "active"? HOT 2
- support compile time checks for regen HOT 2
- Unable to use goMock to test further logic in service implementation
- Wrong mock generated for the interface with generics
- T instead of t used in generate file
- How to mock receiver in method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mock.