kandi X-RAY | hippomocks Summary
kandi X-RAY | hippomocks Summary
Hippomocks ![Build status] "Current build status on Travis CI").
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hippomocks
hippomocks Key Features
hippomocks Examples and Code Snippets
Community Discussions
Trending Discussions on hippomocks
QUESTION
I have a function that expects a buffer length input in a pointer argument, and then puts the number of the read bytes into that same argument as output. Now in my unit test I try to mock it with Hippomocks, and would like to check if the function was called with the correct input value, and at the same time, provide a different output value. How could I achieve this? Thanks!
...ANSWER
Answered 2020-Sep-23 at 11:28Picking in my memory since I haven't used Hippomocks in a long time, I can't give the exact syntax, but that's what Hippomocks' Do()
method is for.
In Hippomocks' test suite you can find a usage example with a lambda expression: https://github.com/dascandy/hippomocks/blob/master/HippoMocksTest/test_do.cpp#L20.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hippomocks
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page