From 1f6a3c833153fe5bc2e7d9b40a2b90dd348b86a5 Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Thu, 11 Aug 2022 11:26:55 -0600 Subject: [PATCH 1/4] Refactor test/ directory to match the rest of the project. 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 --- test/CMakeLists.txt | 24 ++++++++++++++---------- test/{ => include}/c_test_framework.h | 0 test/{ => include}/global_fakes.h | 4 ++-- test/{ => src}/fff_test_c.c | 0 test/{ => src}/fff_test_cpp.cpp | 2 +- test/{ => src}/fff_test_global_c.c | 0 test/{ => src}/fff_test_global_cpp.cpp | 2 +- test/{ => src}/global_fakes.c | 0 test/{ => src}/test_cases.include | 0 9 files changed, 18 insertions(+), 14 deletions(-) rename test/{ => include}/c_test_framework.h (100%) rename test/{ => include}/global_fakes.h (98%) rename test/{ => src}/fff_test_c.c (100%) rename test/{ => src}/fff_test_cpp.cpp (99%) rename test/{ => src}/fff_test_global_c.c (100%) rename test/{ => src}/fff_test_global_cpp.cpp (94%) rename test/{ => src}/global_fakes.c (100%) rename test/{ => src}/test_cases.include (100%) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0aa6679..995ba7d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -4,34 +4,38 @@ # Create a list of common files needed for tests set( COMMON_FILE_LIST - c_test_framework.h - test_cases.include + include/c_test_framework.h + src/test_cases.include ) # Create the C test executable -add_executable(c_test fff_test_c.c ${COMMON_FILE_LIST}) +add_executable(c_test src/fff_test_c.c ${COMMON_FILE_LIST}) +target_include_directories(c_test PRIVATE include) target_link_libraries(c_test PRIVATE fff) # Create the C++ test executable -add_executable(cpp_test fff_test_cpp.cpp ${COMMON_FILE_LIST}) +add_executable(cpp_test src/fff_test_cpp.cpp ${COMMON_FILE_LIST}) +target_include_directories(cpp_test PRIVATE include) target_link_libraries(cpp_test PRIVATE gtest fff) # Create the C global test executable add_executable(c_global_test - fff_test_global_c.c - global_fakes.c - global_fakes.h + src/fff_test_global_c.c + src/global_fakes.c + include/global_fakes.h ${COMMON_FILE_LIST} ) +target_include_directories(c_global_test PRIVATE include) target_link_libraries(c_global_test PRIVATE fff) # Create the C++ global test executable add_executable(cpp_global_test - fff_test_global_cpp.cpp - global_fakes.c - global_fakes.h + src/fff_test_global_cpp.cpp + src/global_fakes.c + include/global_fakes.h ${COMMON_FILE_LIST} ) +target_include_directories(cpp_global_test PRIVATE include) target_link_libraries(cpp_global_test PRIVATE gtest fff) # Add the tests for ctest diff --git a/test/c_test_framework.h b/test/include/c_test_framework.h similarity index 100% rename from test/c_test_framework.h rename to test/include/c_test_framework.h diff --git a/test/global_fakes.h b/test/include/global_fakes.h similarity index 98% rename from test/global_fakes.h rename to test/include/global_fakes.h index 0530dd2..b76a9aa 100644 --- a/test/global_fakes.h +++ b/test/include/global_fakes.h @@ -1,8 +1,8 @@ #ifndef GLOBAL_FAKES_H_ #define GLOBAL_FAKES_H_ -#include "fff.h" -#include "string.h" +#include +#include //// Imaginary production code header file /// diff --git a/test/fff_test_c.c b/test/src/fff_test_c.c similarity index 100% rename from test/fff_test_c.c rename to test/src/fff_test_c.c diff --git a/test/fff_test_cpp.cpp b/test/src/fff_test_cpp.cpp similarity index 99% rename from test/fff_test_cpp.cpp rename to test/src/fff_test_cpp.cpp index b387ae2..153daef 100644 --- a/test/fff_test_cpp.cpp +++ b/test/src/fff_test_cpp.cpp @@ -13,7 +13,7 @@ #define FFF_CALL_HISTORY_LEN OVERRIDE_CALL_HIST_LEN #include "fff.h" -#include +#include "gtest/gtest.h" DEFINE_FFF_GLOBALS diff --git a/test/fff_test_global_c.c b/test/src/fff_test_global_c.c similarity index 100% rename from test/fff_test_global_c.c rename to test/src/fff_test_global_c.c diff --git a/test/fff_test_global_cpp.cpp b/test/src/fff_test_global_cpp.cpp similarity index 94% rename from test/fff_test_global_cpp.cpp rename to test/src/fff_test_global_cpp.cpp index f2cf79e..bb4993d 100644 --- a/test/fff_test_global_cpp.cpp +++ b/test/src/fff_test_global_cpp.cpp @@ -2,7 +2,7 @@ extern "C"{ #include "global_fakes.h" } -#include +#include "gtest/gtest.h" DEFINE_FFF_GLOBALS; diff --git a/test/global_fakes.c b/test/src/global_fakes.c similarity index 100% rename from test/global_fakes.c rename to test/src/global_fakes.c diff --git a/test/test_cases.include b/test/src/test_cases.include similarity index 100% rename from test/test_cases.include rename to test/src/test_cases.include From 2cce6b0fc8d8e4c4db372fc5cbf3263d5f2cefd9 Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Thu, 11 Aug 2022 11:34:53 -0600 Subject: [PATCH 2/4] Add support for custom_fake function signatures 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 --- fakegen.rb | 40 +++- fff.h | 412 ++++++++++++++++++------------------ test/src/test_cases.include | 51 +++-- 3 files changed, 268 insertions(+), 235 deletions(-) diff --git a/fakegen.rb b/fakegen.rb index d937bd3..0603af7 100644 --- a/fakegen.rb +++ b/fakegen.rb @@ -35,10 +35,21 @@ def output_constants putd "#define FFF_GCC_FUNCTION_ATTRIBUTES" } putd "#endif" - + end +def output_default_function_pointer_macro(has_calling_conventions) + name = has_calling_conventions ? "(CALLING_CONVENTION *FUNCNAME)" : "(*FUNCNAME)" + calling_conv = has_calling_conventions ? ", CALLING_CONVENTION" : "" + putd "#ifndef CUSTOM_FFF_FUNCTION_TEMPLATE" + putd_backslash "#define CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN#{calling_conv}, FUNCNAME, ...)" + indent { + putd "RETURN#{name}(__VA_ARGS__)" + } + putd "#endif /* CUSTOM_FFF_FUNCTION_TEMPLATE */" +end + @@ -235,7 +246,9 @@ def define_reset_fake_helper indent { putd_backslash "void FUNCNAME##_reset(void){" indent { - putd_backslash "memset(&FUNCNAME##_fake, 0, sizeof(FUNCNAME##_fake));" + putd_backslash "memset((void*)&FUNCNAME##_fake, 0, sizeof(FUNCNAME##_fake) - sizeof(FUNCNAME##_fake.custom_fake) - sizeof(FUNCNAME##_fake.custom_fake_seq));" + putd_backslash "FUNCNAME##_fake.custom_fake = NULL;" + putd_backslash "FUNCNAME##_fake.custom_fake_seq = NULL;" putd_backslash "FUNCNAME##_fake.arg_history_len = FFF_ARG_HISTORY_LEN;" } putd "}" @@ -359,6 +372,14 @@ def arg_val_list(args_count) arguments.join(", ") end +#example: ARG0_TYPE, ARG1_TYPE +def arg_type_list(args_count) + return "void" if (args_count == 0) + arguments = [] + args_count.times { |i| arguments << "ARG#{i}_TYPE" } + arguments.join(", ") +end + #example: arg0, arg1 def arg_list(args_count) arguments = [] @@ -374,17 +395,15 @@ def arg_list(args_count) def output_custom_function_signature(arg_count, has_varargs, has_calling_conventions, is_value_function) return_type = is_value_function ? "RETURN_TYPE" : "void" ap_list = has_varargs ? ", va_list ap" : "" - signature = has_calling_conventions ? "(CALLING_CONVENTION *custom_fake)" : "(*custom_fake)" - signature += "(#{arg_val_list(arg_count)}#{ap_list});" - putd_backslash return_type + signature + calling_conv = has_calling_conventions ? ", CALLING_CONVENTION" : "" + putd_backslash "CUSTOM_FFF_FUNCTION_TEMPLATE(#{return_type}#{calling_conv}, custom_fake, #{arg_type_list(arg_count)}#{ap_list});" end def output_custom_function_array(arg_count, has_varargs, has_calling_conventions, is_value_function) return_type = is_value_function ? "RETURN_TYPE" : "void" ap_list = has_varargs ? ", va_list ap" : "" - custom_array = has_calling_conventions ? "(CALLING_CONVENTION **custom_fake_seq)" : "(**custom_fake_seq)" - custom_array += "(#{arg_val_list(arg_count)}#{ap_list});" - putd_backslash return_type + custom_array + calling_conv = has_calling_conventions ? ", CALLING_CONVENTION" : "" + putd_backslash "CUSTOM_FFF_FUNCTION_TEMPLATE(#{return_type}#{calling_conv}, *custom_fake_seq, #{arg_type_list(arg_count)}#{ap_list});" end # example: RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1) @@ -483,7 +502,7 @@ def output_function_body(arg_count, has_varargs, is_value_function) putd_backslash "}" } putd_backslash "}" - putd_backslash "if (FUNCNAME##_fake.custom_fake){ " + putd_backslash "if (FUNCNAME##_fake.custom_fake != NULL){ " indent { putd_backslash "RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(#{arg_list(arg_count)});" unless not is_value_function putd_backslash "SAVE_RET_HISTORY(FUNCNAME, ret);" unless not is_value_function @@ -644,6 +663,7 @@ def output_c_and_cpp(has_calling_conventions) include_guard { include_dependencies output_constants + output_default_function_pointer_macro(has_calling_conventions) output_internal_helper_macros yield output_macro_counting_shortcuts(has_calling_conventions) @@ -675,4 +695,4 @@ def help (2..$MAX_ARGS).each {|arg_count| output_macro(arg_count, true, has_calling_conventions, false)} (2..$MAX_ARGS).each {|arg_count| output_macro(arg_count, true, has_calling_conventions, true)} } -} +} \ No newline at end of file diff --git a/fff.h b/fff.h index aa38912..d60f788 100644 --- a/fff.h +++ b/fff.h @@ -39,6 +39,10 @@ SOFTWARE. #ifndef FFF_GCC_FUNCTION_ATTRIBUTES #define FFF_GCC_FUNCTION_ATTRIBUTES #endif +#ifndef CUSTOM_FFF_FUNCTION_TEMPLATE +#define CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN, FUNCNAME, ...) \ + RETURN(*FUNCNAME)(__VA_ARGS__) +#endif /* CUSTOM_FFF_FUNCTION_TEMPLATE */ /* -- INTERNAL HELPER MACROS -- */ #define SET_RETURN_SEQ(FUNCNAME, ARRAY_POINTER, ARRAY_LEN) \ FUNCNAME##_fake.return_val_seq = ARRAY_POINTER; \ @@ -116,7 +120,9 @@ SOFTWARE. #define DEFINE_RESET_FUNCTION(FUNCNAME) \ void FUNCNAME##_reset(void){ \ - memset(&FUNCNAME##_fake, 0, sizeof(FUNCNAME##_fake)); \ + memset((void*)&FUNCNAME##_fake, 0, sizeof(FUNCNAME##_fake) - sizeof(FUNCNAME##_fake.custom_fake) - sizeof(FUNCNAME##_fake.custom_fake_seq)); \ + FUNCNAME##_fake.custom_fake = NULL; \ + FUNCNAME##_fake.custom_fake_seq = NULL; \ FUNCNAME##_fake.arg_history_len = FFF_ARG_HISTORY_LEN; \ } /* -- END INTERNAL HELPER MACROS -- */ @@ -148,8 +154,8 @@ FFF_END_EXTERN_C typedef struct FUNCNAME##_Fake { \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(void); \ - void(**custom_fake_seq)(void); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, void); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, void); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -173,7 +179,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(); \ } \ } \ @@ -189,8 +195,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0); \ - void(**custom_fake_seq)(ARG0_TYPE arg0); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -216,7 +222,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0); \ } \ } \ @@ -233,8 +239,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -262,7 +268,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1); \ } \ } \ @@ -280,8 +286,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -311,7 +317,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2); \ } \ } \ @@ -330,8 +336,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -363,7 +369,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3); \ } \ } \ @@ -383,8 +389,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -418,7 +424,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4); \ } \ } \ @@ -439,8 +445,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -476,7 +482,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5); \ } \ } \ @@ -498,8 +504,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -537,7 +543,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ } \ } \ @@ -560,8 +566,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -601,7 +607,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ } \ } \ @@ -625,8 +631,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -668,7 +674,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ } \ } \ @@ -693,8 +699,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -738,7 +744,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ } \ } \ @@ -764,8 +770,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -811,7 +817,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ } \ } \ @@ -838,8 +844,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -887,7 +893,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ } \ } \ @@ -915,8 +921,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -966,7 +972,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ } \ } \ @@ -995,8 +1001,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1048,7 +1054,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ } \ } \ @@ -1078,8 +1084,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1133,7 +1139,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ } \ } \ @@ -1164,8 +1170,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1221,7 +1227,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ } \ } \ @@ -1253,8 +1259,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1312,7 +1318,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ } \ } \ @@ -1345,8 +1351,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1406,7 +1412,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ } \ } \ @@ -1440,8 +1446,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1503,7 +1509,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ } \ } \ @@ -1538,8 +1544,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1603,7 +1609,7 @@ FFF_END_EXTERN_C FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ } \ } \ @@ -1620,8 +1626,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(void); \ - RETURN_TYPE(**custom_fake_seq)(void); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, void); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, void); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1650,7 +1656,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -1672,8 +1678,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1704,7 +1710,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -1727,8 +1733,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1761,7 +1767,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -1785,8 +1791,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1821,7 +1827,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -1846,8 +1852,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1884,7 +1890,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -1910,8 +1916,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -1950,7 +1956,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -1977,8 +1983,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2019,7 +2025,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2047,8 +2053,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2091,7 +2097,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2120,8 +2126,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2166,7 +2172,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2196,8 +2202,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2244,7 +2250,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2275,8 +2281,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2325,7 +2331,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2357,8 +2363,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2409,7 +2415,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2442,8 +2448,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2496,7 +2502,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2530,8 +2536,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2586,7 +2592,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2621,8 +2627,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2679,7 +2685,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2715,8 +2721,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2775,7 +2781,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2812,8 +2818,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2874,7 +2880,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -2912,8 +2918,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -2976,7 +2982,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -3015,8 +3021,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3081,7 +3087,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -3121,8 +3127,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3189,7 +3195,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -3230,8 +3236,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3300,7 +3306,7 @@ FFF_END_EXTERN_C return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ } \ } \ - if (FUNCNAME##_fake.custom_fake){ \ + if (FUNCNAME##_fake.custom_fake != NULL){ \ RETURN_TYPE ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ SAVE_RET_HISTORY(FUNCNAME, ret); \ return ret; \ @@ -3320,8 +3326,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3373,8 +3379,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3429,8 +3435,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3488,8 +3494,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3550,8 +3556,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3615,8 +3621,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3683,8 +3689,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3754,8 +3760,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3828,8 +3834,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3905,8 +3911,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -3985,8 +3991,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4068,8 +4074,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4154,8 +4160,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4243,8 +4249,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4335,8 +4341,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4430,8 +4436,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4528,8 +4534,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4629,8 +4635,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4733,8 +4739,8 @@ FFF_END_EXTERN_C DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(void, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4823,8 +4829,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4887,8 +4893,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -4954,8 +4960,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5024,8 +5030,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5097,8 +5103,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5173,8 +5179,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5252,8 +5258,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5334,8 +5340,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5419,8 +5425,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5507,8 +5513,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5598,8 +5604,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5692,8 +5698,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5789,8 +5795,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5889,8 +5895,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -5992,8 +5998,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -6098,8 +6104,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -6207,8 +6213,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -6319,8 +6325,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ @@ -6434,8 +6440,8 @@ FFF_END_EXTERN_C DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_RETURN_VALUE_HISTORY(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, custom_fake, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, va_list ap); \ + CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN_TYPE, *custom_fake_seq, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, va_list ap); \ } FUNCNAME##_Fake; \ extern FUNCNAME##_Fake FUNCNAME##_fake; \ void FUNCNAME##_reset(void); \ diff --git a/test/src/test_cases.include b/test/src/test_cases.include index d15fa2f..261f7f2 100644 --- a/test/src/test_cases.include +++ b/test/src/test_cases.include @@ -244,9 +244,11 @@ void voidfunc1outparam_custom_fake3(char *a) TEST_F(FFFTestSuite, custom_fake_sequence_not_exausthed) { - void (*custom_fakes[])(char *) = {voidfunc1outparam_custom_fake1, - voidfunc1outparam_custom_fake2, - voidfunc1outparam_custom_fake3}; + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fakes[], char *) = { + voidfunc1outparam_custom_fake1, + voidfunc1outparam_custom_fake2, + voidfunc1outparam_custom_fake3 + }; char a = 'a'; SET_CUSTOM_FAKE_SEQ(voidfunc1outparam, custom_fakes, 3); @@ -304,9 +306,10 @@ long custom_longfunc3(void) TEST_F(FFFTestSuite, custom_fake_seq_return_values_saved_in_history) { - long (*custom_fakes[])(void) = {custom_longfunc1, - custom_longfunc2, - custom_longfunc3}; + CUSTOM_FFF_FUNCTION_TEMPLATE(long, custom_fakes[], void) = { + custom_longfunc1, + custom_longfunc2, + custom_longfunc3}; SET_CUSTOM_FAKE_SEQ(longfunc0, custom_fakes, 3); @@ -321,9 +324,10 @@ TEST_F(FFFTestSuite, custom_fake_seq_return_values_saved_in_history) TEST_F(FFFTestSuite, custom_fake_sequence_exhausted) { - void (*custom_fakes[])(char *) = {voidfunc1outparam_custom_fake1, - voidfunc1outparam_custom_fake2, - voidfunc1outparam_custom_fake3}; + CUSTOM_FFF_FUNCTION_TEMPLATE(void, custom_fakes[], char *) = { + voidfunc1outparam_custom_fake1, + voidfunc1outparam_custom_fake2, + voidfunc1outparam_custom_fake3}; char a = 'a'; SET_CUSTOM_FAKE_SEQ(voidfunc1outparam, custom_fakes, 3); @@ -399,9 +403,10 @@ int valuefunc3var_custom_fake3(const char *str, int a, va_list vl) TEST_F(FFFTestSuite, vararg_custom_fake_sequence_not_exhausted) { - int (*custom_fakes[])(const char *, int, va_list) = {valuefunc3var_custom_fake1, - valuefunc3var_custom_fake2, - valuefunc3var_custom_fake3}; + CUSTOM_FFF_FUNCTION_TEMPLATE(int, custom_fakes[], const char *, int, + va_list) = {valuefunc3var_custom_fake1, + valuefunc3var_custom_fake2, + valuefunc3var_custom_fake3}; SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3); int a = 1; ASSERT_EQ(valuefunc3var("a", a, 2, 3, 4, 0), 10); @@ -411,9 +416,10 @@ TEST_F(FFFTestSuite, vararg_custom_fake_sequence_not_exhausted) TEST_F(FFFTestSuite, vararg_custom_fake_seq_return_values_saved_in_history) { - int (*custom_fakes[])(const char *, int, va_list) = {valuefunc3var_custom_fake1, - valuefunc3var_custom_fake2, - valuefunc3var_custom_fake3}; + CUSTOM_FFF_FUNCTION_TEMPLATE(int, custom_fakes[], const char *, int, + va_list) = {valuefunc3var_custom_fake1, + valuefunc3var_custom_fake2, + valuefunc3var_custom_fake3}; SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3); int a = 1; valuefunc3var("a", a, 2, 3, 4, 0); @@ -426,9 +432,10 @@ TEST_F(FFFTestSuite, vararg_custom_fake_seq_return_values_saved_in_history) TEST_F(FFFTestSuite, vararg_custom_fake_sequence_exhausted) { - int (*custom_fakes[])(const char *, int, va_list) = {valuefunc3var_custom_fake1, - valuefunc3var_custom_fake2, - valuefunc3var_custom_fake3}; + CUSTOM_FFF_FUNCTION_TEMPLATE(int, custom_fakes[], const char *, int, + va_list) = {valuefunc3var_custom_fake1, + valuefunc3var_custom_fake2, + valuefunc3var_custom_fake3}; SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3); int a = 1; ASSERT_EQ(valuefunc3var("a", a, 2, 3, 4, 0), 10); @@ -440,9 +447,10 @@ TEST_F(FFFTestSuite, vararg_custom_fake_sequence_exhausted) TEST_F(FFFTestSuite, vararg_custom_fake_sequence_reset) { - int (*custom_fakes[])(const char *, int, va_list) = {valuefunc3var_custom_fake1, - valuefunc3var_custom_fake2, - valuefunc3var_custom_fake3}; + CUSTOM_FFF_FUNCTION_TEMPLATE(int, custom_fakes[], const char *, int, + va_list) = {valuefunc3var_custom_fake1, + valuefunc3var_custom_fake2, + valuefunc3var_custom_fake3}; SET_CUSTOM_FAKE_SEQ(valuefunc3var, custom_fakes, 3); int a = 1; ASSERT_EQ(valuefunc3var("a", a, 2, 3, 4, 0), 10); @@ -534,4 +542,3 @@ TEST_F(FFFTestSuite, value_func_can_capture_upto_20_arguments_correctly) ASSERT_EQ(18, valuefunc20_fake.arg18_val); ASSERT_EQ(19, valuefunc20_fake.arg19_val); } - From d254d115e1a39de01bbb6eb503db86c5e662bded Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Thu, 11 Aug 2022 12:12:28 -0600 Subject: [PATCH 3/4] Add tests to verify std::function works with capturing lambda Introduce a test that uses a capturing lambda as a custom_fake. Signed-off-by: Yuval Peress --- test/CMakeLists.txt | 16 ++++++++++ test/include/custom_function.hpp | 10 +++++++ test/include/fff_wrapper.hpp | 11 +++++++ .../src/fff_test_custom_function_template.cpp | 29 +++++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 test/include/custom_function.hpp create mode 100644 test/include/fff_wrapper.hpp create mode 100644 test/src/fff_test_custom_function_template.cpp diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 995ba7d..7b41be3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -38,6 +38,22 @@ add_executable(cpp_global_test target_include_directories(cpp_global_test PRIVATE include) target_link_libraries(cpp_global_test PRIVATE gtest fff) +# Create the C++ custom function signature executable +add_executable(cpp_custom_fn_signature_test + src/fff_test_custom_function_template.cpp + ${COMMON_FILE_LIST} +) +target_include_directories(cpp_custom_fn_signature_test PRIVATE include) +target_link_libraries(cpp_custom_fn_signature_test PRIVATE gtest fff) +# Due to a bug in WinLibs for Windows it's not currently possible to use: +# target_precompile_headers(cpp_custom_fn_signature_test PUBLIC include/custom_function.hpp) +# See more info at target_precompile_headers(cpp_custom_fn_signature_test PUBLIC include/custom_function.hpp) + +add_test( + NAME cpp_custom_fn_signature_test + COMMAND $ + ) + # Add the tests for ctest add_test( NAME c_test diff --git a/test/include/custom_function.hpp b/test/include/custom_function.hpp new file mode 100644 index 0000000..d9f3934 --- /dev/null +++ b/test/include/custom_function.hpp @@ -0,0 +1,10 @@ +/* Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +#define CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN, FUNCNAME, ...) \ + std::function FUNCNAME diff --git a/test/include/fff_wrapper.hpp b/test/include/fff_wrapper.hpp new file mode 100644 index 0000000..e3c0cac --- /dev/null +++ b/test/include/fff_wrapper.hpp @@ -0,0 +1,11 @@ +/* Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +#include "custom_function.hpp" + +#include \ No newline at end of file diff --git a/test/src/fff_test_custom_function_template.cpp b/test/src/fff_test_custom_function_template.cpp new file mode 100644 index 0000000..53689c3 --- /dev/null +++ b/test/src/fff_test_custom_function_template.cpp @@ -0,0 +1,29 @@ +/* Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +#include "fff_wrapper.hpp" + +DEFINE_FFF_GLOBALS + +FAKE_VOID_FUNC(do_stuff, int); + +class FFFCustomFakeSuite : public ::testing::Test { + public: + void SetUp() override { + RESET_FAKE(do_stuff); + FFF_RESET_HISTORY(); + } +}; + +TEST_F(FFFCustomFakeSuite, custom_cpp_fake_function) +{ + int x = 0; + do_stuff_fake.custom_fake = [&x](int i) { + x = i; + }; + do_stuff(5); + ASSERT_EQ(5, x); +} From 3ede05133f63a161f6c958fea870f50e292a2ad3 Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Thu, 11 Aug 2022 23:12:23 -0600 Subject: [PATCH 4/4] Update the docs to demonstrate custom function signatures Update the GCC specific example of nested functions to support capturing lambdas when a custom function signature is used with std::function. Signed-off-by: Yuval Peress --- README.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3255e6a..7701cfa 100644 --- a/README.md +++ b/README.md @@ -459,9 +459,17 @@ The basic mechanism that fff provides you in this case is the custom_fake field You need to create a custom function (e.g. getTime_custom_fake) to produce the output optionally by use of a helper variable (e.g. getTime_custom_now) to retrieve that output from. Then some creativity to tie it all together. The most important part (IMHO) is to keep your test case readable and maintainable. -In case your project uses a C compiler that supports nested functions (e.g. GCC) you can even combine all this in a single unit test function so you can easily oversee all details of the test. +In case your project uses a C compiler that supports nested functions (e.g. GCC), or when using C++ lambdas, you can even combine all this in a single unit test function so you can easily oversee all details of the test. ```c +#include + +/* Configure FFF to use std::function, which enables capturing lambdas */ +#define CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN, FUNCNAME, ...) \ + std::function FUNCNAME + +#include "fff.h" + /* The time structure */ typedef struct { int hour, min; @@ -474,15 +482,13 @@ FAKE_VOID_FUNC(getTime, Time*); TEST_F(FFFTestSuite, when_value_custom_fake_called_THEN_it_returns_custom_output) { Time t; - Time getTime_custom_now; - void getTime_custom_fake(Time *now) { - *now = getTime_custom_now; - } - getTime_fake.custom_fake = getTime_custom_fake; - - /* given a specific time */ - getTime_custom_now.hour = 13; - getTime_custom_now.min = 05; + Time getTime_custom_now = { + .hour = 13, + .min = 05, + }; + getTime_fake.custom_fake = [getTime_custom_now](Time *now) { + *now = getTime_custom_now; + }; /* when getTime is called */ getTime(&t);