1
0
mirror of https://github.com/meekrosoft/fff synced 2026-01-23 00:15:59 +01:00

232 Commits

Author SHA1 Message Date
Mike Long
9c89d72548 Merge pull request #18 from aunsbjerg/master
Auto-counting macros for declaration and definition of fake
2016-12-22 09:49:36 +01:00
mj
2c47f8aa49 Added simple explanation and example to readme file 2016-12-18 15:19:08 +01:00
mj
f4b03caa88 Removed file I accidentally added 2016-12-18 15:06:48 +01:00
mj
0cf75a229e Added auto counting of parameters for declaration and definition of fake functions for global use. Adjusted unit tests of global functions 2016-12-18 15:03:15 +01:00
mj
daff1fb430 added helper for generating argument sequences 2016-12-18 11:25:11 +01:00
Mike Long
765109f9a2 Merge pull request #17 from alvarez86/update_custom_fake_seq_readme
README: Update README.md to give example of SET_CUSTOM_FAKE_SEQ macro
2016-09-28 07:56:44 +02:00
Paulo Antonio Alvarez
0daa84efe6 README: Update README.md to give example of SET_CUSTOM_FAKE_SEQ macro
The readme now contains an example taken from the test suite of how to
use the SET_CUSTOM_FAKE_SEQ macro.
2016-09-26 22:58:32 -03:00
Mike Long
ff40273dba Merge pull request #16 from CiderMan/master
Fix for issue 8
2016-09-25 19:32:47 +01:00
Mike Long
f88a17c2f3 Merge pull request #15 from alvarez86/custom_fake_seq
Support for custom fake sequences on non-variadic functions
2016-09-25 10:33:51 +02:00
Steve Hill
df0dc5deea Added missing #include, built and tested 2016-09-23 19:25:30 +01:00
Steve Hill
54cb4ff06e Add vim backup files to .gitignore 2016-09-23 19:19:03 +01:00
Paulo Antonio Alvarez
218cdf7067 fff.h with support to custom fake sequences (non-variadic functions)
The fff.h file now supports setting a sequence of custom fakes for
non-variadic functions using the SET_CUSTOM_FAKE_SEQ macro, with
works much like the SET_RETURN_SEQ macro.
2016-09-14 01:41:27 -03:00
Paulo Antonio Alvarez
961289f578 Added two test cases for SET_CUSTOM_FAKE_SEQ
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?
2016-09-14 01:33:20 -03:00
Paulo Antonio Alvarez
845a8e2549 Support for custom fake function sequences (non-variadic functions)
This makes it possible to set a sequence of custom fakes for a function
using the macro SET_CUSTOM_FAKE_SEQ. Very useful for functions with out
parameters. Now we don't have to count the number of calls to implement
different behaviours on custom fakes.
2016-09-14 01:33:16 -03:00
Mike Long
3cd33eda54 Add travis build status to readme 2016-07-06 10:41:08 +02:00
Mike Long
ab1c68642b Initial try at a travis yaml 2016-07-06 10:36:12 +02:00
Mike Long
984059e60d Add git ignore to ignore build directory 2016-07-06 10:35:49 +02:00
Mike Long
8de85a4a68 Merge pull request #11 from rubiot/variadic_custom_fakes
Support for variadic custom fakes
2016-07-06 10:26:51 +02:00
Rubio R. C. Terra
6392c5fa1f Build and test with support for variadic custom fakes 2016-06-07 10:01:40 -03:00
Rubio R. C. Terra
88864216d3 Added test case for FAKE_VALUE_FUNC_VARARG. 2016-06-07 10:01:36 -03:00
Rubio R. C. Terra
8c7bd6912f Added macro counting shortcuts for variadic fakes 2016-06-07 10:01:31 -03:00
Rubio R. C. Terra
fa15147055 Added custom fake support for variadic functions
Custom fake support for variadic functions was limited. The variable
parameters were not passed to the custom fake.

Now a va_list is passed to the custom fake, so it is possible to access
all the arguments. For instance, a custom fake for fprintf() could call
the real fprintf() like this:

int fprintf_custom(FILE *stream, const char *format, va_list ap) {
  if (fprintf0_fake.return_val < 0) // should we fail?
    return fprintf0_fake.return_val;
  return vfprintf(stream, format, ap);
}
2016-06-07 10:01:26 -03:00
Rubio R. C. Terra
a34e5a5a20 Adding a line break after license 2016-06-07 10:01:09 -03:00
Mike Long
f73252e4a1 Merge pull request #10 from CiderMan/master
Fix for issue 9
2016-05-16 20:07:43 +02:00
Steve Hill
bb44ed6141 Built and tested following updates 2016-04-08 12:32:06 +01:00
Steve Hill
63fe49c960 Change (END_)EXTERN_C to have FFF_ prefix 2016-04-08 12:21:01 +01:00
Steve Hill
701e5c45fa Changed comment style to give strict C89 compatibility 2016-04-08 12:16:15 +01:00
Mike Long
7578fc4fca Delete old unused header file 2014-03-07 08:52:04 +08:00
Mike Long
cbe9b8b7fb Add license file and make gtest compile with own TR1 tuple library 2014-01-09 22:04:03 +08:00
Mike Long
2afa7273b7 Added the tips from Micha into the readme 2013-07-20 13:43:51 +08:00
Mike Long
3612b9e84e Update the readme with Micha's information on return by reference 2013-07-04 17:10:30 +08:00
Mike Long
c38a1343a4 Add support for up to 20 arguments 2013-06-26 07:43:25 +08:00
Mike Long
0f9f1d939d Merged varargs support with const support 2013-06-23 22:22:34 +08:00
Micha Hoiting
ef62856fc3 Implement minimal support for varargs 2012-11-09 01:33:10 +01:00
Micha Hoiting
3cf610ea97 Add support for const parameters in fakes (C only) 2012-11-08 23:14:02 +01:00
Micha Hoiting
cacd5f5459 Add vararg support (Work In Progress) 2012-11-07 23:14:04 +01:00
Micha Hoiting
e35ae98cac Add test with const parameters 2012-11-07 22:56:45 +01:00
Micha Hoiting
f0ea84ce35 Improve makefiles
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'.
2012-11-07 22:32:13 +01:00
Mike Long
82c6df459c Added custom fake information to the readme documentation 2012-09-14 08:11:00 +08:00
Mike Long
7c00d3a53d Cleanup UI example to non-argument length specific syntax 2012-09-08 10:33:57 +08:00
Mike Long
e31153b6fb Make the driver examples capable of compiling together 2012-09-08 10:32:23 +08:00
Mike Long
be1c831d25 Added driver testing example and cleanup the buildandtest script 2012-09-06 07:45:05 +08:00
Mike Long
d14ea470e8 Add tests for returning custom fake return values on non-void custom fakes 2012-07-06 03:29:10 +08:00
Mike Long
4edb01b8f9 Add support to return the return value from custom fakes when it is a non-void function 2012-07-06 01:36:52 +08:00
Mike Long
1aa823ea2b Add test case for returning values from custom fakes 2012-07-06 01:36:14 +08:00
Mike Long
ef60da4685 fix include file name 2012-07-06 01:35:18 +08:00
Mike Long
cd896ccaf9 fix include file name 2012-07-06 01:33:34 +08:00
Mike Long
aacca34887 fix include file name 2012-07-06 01:33:18 +08:00
Mike Long
8acac8ef44 Moved embedded user interface example into own directory 2012-06-27 07:49:41 +08:00
Mike Long
932760d8ff Removed old fff.h - updated to the new fff style 2012-06-26 21:09:11 +08:00