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

213 Commits

Author SHA1 Message Date
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
Mike Long
b034fe2822 Updated to new fff style 2012-06-26 21:07:44 +08:00
Mike Long
1609a5199e Update to counting fake generation macro 2012-06-26 21:07:20 +08:00
Mike Long
522a972d2e Update to counting fake generation macro 2012-06-26 21:07:10 +08:00
Mike Long
899f5617a0 Some small tidying 2012-06-26 20:35:33 +08:00
Mike Long
480c88e1af Added helper macro to generate fake reset function 2012-05-29 08:33:23 +08:00
Mike Long
7aee4ece7b Cleanup generator 2012-05-29 07:57:11 +08:00
Mike Long
3d6cfd218b Moved global variables into struct so they don't pollute the global namespace 2012-05-29 07:46:21 +08:00
Mike Long
fef801e995 Cleanup generator to remove deleted code 2012-05-28 07:19:57 +08:00
Mike Long
3345f90d12 Unified cpp and c fake definitions 2012-05-25 17:44:41 +08:00
Mike Long
6f07a118d7 Generated file 2012-05-25 08:06:12 +08:00
Mike Long
039f3d93a1 Clean up indentation 2012-05-25 08:05:49 +08:00
Mike Long
72ec46f852 Common test cases for Fake Function Framework 2012-05-24 17:52:00 +08:00
Mike Long
f8af106f31 Test suite for global fakes from a cpp context 2012-05-24 17:51:20 +08:00
Mike Long
8ee3ba7261 A simple test framework for C code with googletest compatibility 2012-05-24 17:49:35 +08:00
Mike Long
2e0bb77ac7 Add fakes for common test cases 2012-05-24 17:47:13 +08:00
Mike Long
54fae16407 Add fakes for common test cases 2012-05-24 17:45:40 +08:00
Mike Long
09a747232c Add common test cases 2012-05-24 17:43:45 +08:00
Mike Long
5f914c5af7 Factor out common test cases into a common include file 2012-05-24 17:41:50 +08:00
Mike Long
8a1ccaf25c Factor out common test cases into a common include file 2012-05-24 17:41:18 +08:00