Comments (4)
I know this post is old, but I had the same issue today. Changing MAX_ARGS to 15 and rebuilding seemed to create the macros (FAKE_VOID_FUNC10 - 14, etc) just fine. The problem for me was with the following macros:
PP_ARG_MINUS2_N
PP_RSEQ_N_MINUS2
PP_ARG_MINUS1_N
PP_RSEQ_N_MINUS1
These macros return the number of parameters (minus 1 for void func, or minus 2 for value func). The value returned is later appended to the FAKE_*_FUNC macro to call the macro for the appropriate number of parameters (FAKE_VOID_FUNC4, for example).
In the generator script, when the macros for the additional parameters are added (beyond 9), the enumerations in these macros also need to be updated. For MAX_ARGS at 15, here are the values I'm using for each macro:
#define PP_ARG_MINUS2_N(returnVal, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, N, ...) N
#define PP_RSEQ_N_MINUS2() 14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
#define PP_ARG_MINUS1_N(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, N, ...) N
#define PP_RSEQ_N_MINUS1() 14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
I just changed the fff.h file directly (I did not bother with the generator script, since I'll likely never have to change it again).
Great framework by the way...
from fff.
Thanks guys, I see that there is a definite need for this. Let me add it this week and get back to you.
from fff.
Added support for up to 20 arguments today - hope this helps you guys!
from fff.
Thanks! Very nice work...
from fff.
Related Issues (20)
- fatal error: 'tr1/tuple' file not found HOT 1
- SET_RETURN_SEQ should reset return_val_seq_idx HOT 1
- Can FFF be used to generate the actual fake implementation?
- Argument history storing derefenced pointers HOT 1
- warning: ISO C99 requires at least one argument for the "..." in a variadic macro HOT 1
- Is it possible to mock static functions? HOT 1
- #pragma pack(1) breaks Function Return Value Sequences HOT 1
- How to install and to use? HOT 3
- Allow support for std::function as the `custom_fake` type HOT 1
- Linking issue in the example project HOT 1
- fake.callcount is always 0 when reuse a fake across multiple test-suites HOT 5
- FFF generated reset functions have mangled names HOT 2
- C++ Support for FFF Framework HOT 1
- Question: Releases and project maintenance
- Mocking static methods of the class HOT 3
- Is there a forum or fff community page for answering questions? HOT 2
- Automatically generate mocks: fff-mock-gen HOT 1
- include fff.h once
- Ddf
- Use of fff to mock c++ class member functions HOT 5
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 fff.