* Add missing GTest linking
* Add unit testing switch
* Rename UNIT_TESTING to be fff-specific
* Add fff.h generation toggle
* Use options instead of variables for disabling build elements
* Add interface library for when the header is not regenerated
* Update build script and README
Update the generator to include a check for CUSTOM_FFF_FUNCTION_TEMPLATE.
If not present it will default to the C style function pointer.
Alternatively, developers may define their own version of the template to
leverage std::function or pw:Function (from the embedded Pigweed library).
Signed-off-by: Yuval Peress <peress@google.com>
The prior PR didn't touch this directory because it was getting too big
and I wanted the diff to be smaller for the test directory. Now addressing
that.
Signed-off-by: Yuval Peress <peress@google.com>
Replace makefiles with CMakeLists.txt. This will allow for IDE and
platform agnostic builds of FFF.
Update the CI for FFF to use github workflows which don't depend on MS VC.
The workflow added will verify the pull requests sent to master buy
running 'buildandtest' which mirrors the developer workflow.
Signed-off-by: Yuval Peress <peress@google.com>
* Custom return value delegate sequences for variadic functions
* Added unit tests for variadic functions custom return value delegate sequences
* Fixes in code style
* Variadic functions custom delegates also tested in C++
* Fixed some compilation warnings
* Added test for variadic function custom delegates sequence reset
* Updated documentation with variadic functions custom delegate sequences
* Update README.md
* Minor style changes.
Thank you very much @oliviera9!
Assuming your C interfaces are appropriately wrapped for C++, it is
unnecessary to force the fakes to be declared extern "C", and doing so
causes any functions declared with C++ linkage to be impossible to fake
due to the conflicting linkage declarations.
We test the following cases:
1 - Are return values set with fake.return_val saved in history?
2 - Are return values of a RETURN_SEQ saved in history?
3 - Are return values return by a CUSTOM_FAKE_SEQ saved in history?
Using a function that sets a value on a variable via a char pointer, we
test the following:
1 - Does the custom fakes are called in the expected order?
2 - When the sequence length is exhausted, do we only call the last
custom fake in the sequence from then on?
Added the use of the $(MAKE) variable to support 'gnumake'.
Fixed an issue with some make compile rule and the -o option.
All targets are removed from the build directory when running 'make clean'.