Skip to content

Commit

Permalink
Merge 23f39fc into 7e09f07
Browse files Browse the repository at this point in the history
  • Loading branch information
yperess committed Aug 1, 2022
2 parents 7e09f07 + 23f39fc commit 920d15d
Show file tree
Hide file tree
Showing 16 changed files with 426 additions and 319 deletions.
2 changes: 2 additions & 0 deletions buildandtest
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ make clean
make all
build/fff_test_c
build/fff_test_cpp --gtest_output=xml:build/test_results.xml
build/fff_test_cpp_custom_fn --gtest_output=xml:build/test_results_custom_fn.xml
build/ui_test_ansic
build/ui_test_cpp --gtest_output=xml:build/example_results.xml
build/fff_test_glob_c
build/fff_test_glob_cpp --gtest_output=xml:build/test_global_results.xml
build/fff_test_glob_cpp_custom_fn --gtest_output=xml:build/test_global_results_custom_fn.xml
build/driver_testing --gtest_output=xml:build/driver_testing.xml
build/driver_testing_fff --gtest_output=xml:build/driver_testing_fff.xml
build/weak_linking/test_display
Expand Down
36 changes: 28 additions & 8 deletions fakegen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ def output_constants
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




Expand Down Expand Up @@ -231,7 +242,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 "}"
Expand Down Expand Up @@ -355,6 +368,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 = []
Expand All @@ -370,17 +391,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)
Expand Down Expand Up @@ -479,7 +498,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
Expand Down Expand Up @@ -639,6 +658,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)
Expand Down
413 changes: 210 additions & 203 deletions fff.h

Large diffs are not rendered by default.

46 changes: 41 additions & 5 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@ $(BUILD_DIR)/fff_test_cpp.o \
$(BUILD_DIR)/gtest-all.o \
$(BUILD_DIR)/gtest-main.o

FFF_TEST_CPP_CUSTOM_FN_OBJS += \
$(BUILD_DIR)/fff_test_cpp_custom_fn.o \
$(BUILD_DIR)/gtest-all.o \
$(BUILD_DIR)/gtest-main.o

FFF_TEST_GLOBAL_CPP_OBJS += \
$(BUILD_DIR)/fff_test_global_cpp.o \
$(BUILD_DIR)/global_fakes.o \
$(BUILD_DIR)/global_fakes_cpp.o \
$(BUILD_DIR)/gtest-all.o \
$(BUILD_DIR)/gtest-main.o

FFF_TEST_GLOBAL_CPP_CUSTOM_FN_OBJS += \
$(BUILD_DIR)/fff_test_global_cpp_custom_fn.o \
$(BUILD_DIR)/global_fakes_cpp_custom_fn.o \
$(BUILD_DIR)/gtest-all.o \
$(BUILD_DIR)/gtest-main.o

Expand All @@ -18,14 +29,16 @@ FFF_TEST_GLOBAL_C_OBJS += \
$(BUILD_DIR)/global_fakes.o \
$(BUILD_DIR)/fff_test_global_c.o

FFF_TEST_CPP_TARGET = $(BUILD_DIR)/fff_test_cpp
FFF_TEST_C_TARGET = $(BUILD_DIR)/fff_test_c
FFF_TEST_CPP_TARGET = $(BUILD_DIR)/fff_test_cpp
FFF_TEST_CPP_CUSTOM_FN_TARGET = $(BUILD_DIR)/fff_test_cpp_custom_fn
FFF_TEST_GLOBAL_C_TARGET = $(BUILD_DIR)/fff_test_glob_c
FFF_TEST_GLOBAL_CPP_TARGET = $(BUILD_DIR)/fff_test_glob_cpp
FFF_TEST_GLOBAL_CPP_CUSTOM_FN_TARGET = $(BUILD_DIR)/fff_test_glob_cpp_custom_fn

LIBS := -lpthread
# All Target
all: $(FFF_TEST_CPP_TARGET) $(FFF_TEST_C_TARGET) $(FFF_TEST_GLOBAL_C_TARGET) $(FFF_TEST_GLOBAL_CPP_TARGET)
all: $(FFF_TEST_CPP_TARGET) $(FFF_TEST_CPP_CUSTOM_FN_TARGET) $(FFF_TEST_C_TARGET) $(FFF_TEST_GLOBAL_C_TARGET) $(FFF_TEST_GLOBAL_CPP_TARGET) $(FFF_TEST_GLOBAL_CPP_CUSTOM_FN_TARGET)


# Each subdirectory must supply rules for building sources it contributes
Expand All @@ -36,6 +49,13 @@ $(BUILD_DIR)/%.o: %.cpp
@echo 'Finished building: $<'
@echo ' '

$(BUILD_DIR)/%_custom_fn.o: %.cpp
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
g++ -I../ -O0 -g3 -Wall -DGTEST_USE_OWN_TR1_TUPLE=1 -include custom_function.hpp -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

$(BUILD_DIR)/%.o: %.c
@echo 'Building file: $<'
@echo 'Invoking: GCC C Compiler'
Expand All @@ -52,6 +72,13 @@ $(FFF_TEST_CPP_TARGET): $(FFF_TEST_CPP_OBJS)
@echo 'Finished building target: $@'
@echo ' '

$(FFF_TEST_CPP_CUSTOM_FN_TARGET): $(FFF_TEST_CPP_CUSTOM_FN_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
g++ -o "$(FFF_TEST_CPP_CUSTOM_FN_TARGET)" $(FFF_TEST_CPP_CUSTOM_FN_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

$(FFF_TEST_C_TARGET): $(FFF_TEST_C_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C Linker'
Expand All @@ -73,9 +100,18 @@ $(FFF_TEST_GLOBAL_CPP_TARGET): $(FFF_TEST_GLOBAL_CPP_OBJS)
@echo 'Finished building target: $@'
@echo ' '

$(FFF_TEST_GLOBAL_CPP_CUSTOM_FN_TARGET): $(FFF_TEST_GLOBAL_CPP_CUSTOM_FN_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
g++ -o "$(FFF_TEST_GLOBAL_CPP_CUSTOM_FN_TARGET)" $(FFF_TEST_GLOBAL_CPP_CUSTOM_FN_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

# Other Targets
clean:
-$(RM) $(FFF_TEST_CPP_OBJS) $(FFF_TEST_GLOBAL_C_OBJS) $(FFF_TEST_C_OBJS) \
$(FFF_TEST_CPP_TARGET) $(FFF_TEST_C_TARGET) $(FFF_TEST_GLOBAL_CPP_TARGET) $(FFF_TEST_GLOBAL_C_TARGET)
-$(RM) $(FFF_TEST_CPP_OBJS) $(FFF_TEST_CPP_CUSTOM_FN_OBJS) $(FFF_TEST_GLOBAL_C_OBJS) $(FFF_TEST_C_OBJS) \
$(FFF_TEST_GLOBAL_CPP_OBJS) $(FFF_TEST_GLOBAL_CPP_CUSTOM_FN_OBJS) $(FFF_TEST_CPP_TARGET) \
$(FFF_TEST_CPP_CUSTOM_FN_TARGET) $(FFF_TEST_C_TARGET) $(FFF_TEST_GLOBAL_CPP_TARGET) \
$(FFF_TEST_GLOBAL_CPP_CUSTOM_FN_TARGET) $(FFF_TEST_GLOBAL_C_TARGET)
-@echo ' '

6 changes: 6 additions & 0 deletions test/custom_function.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once

#include <functional>

#define CUSTOM_FFF_FUNCTION_TEMPLATE(RETURN, FUNCNAME, ...) \
std::function<RETURN (__VA_ARGS__)> FUNCNAME
4 changes: 1 addition & 3 deletions test/fff_test_global_cpp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

extern "C"{
#include "global_fakes.h"
}
#include "global_fakes.hpp"
#include <gtest/gtest.h>

DEFINE_FFF_GLOBALS;
Expand Down
32 changes: 1 addition & 31 deletions test/global_fakes.c
Original file line number Diff line number Diff line change
@@ -1,34 +1,4 @@
#include "global_fakes.h"
#include <string.h> // for memcpy

#ifndef TEST_WITH_CALLING_CONVENTIONS
DEFINE_FAKE_VOID_FUNC(voidfunc1, int);
DEFINE_FAKE_VOID_FUNC(voidfunc2, char, char);
DEFINE_FAKE_VOID_FUNC(voidfunc1outparam, char *);

DEFINE_FAKE_VALUE_FUNC(long, longfunc0);
DEFINE_FAKE_VALUE_FUNC(enum MYBOOL, enumfunc0);
DEFINE_FAKE_VALUE_FUNC(struct MyStruct, structfunc0);
DEFINE_FAKE_VOID_FUNC_VARARG(voidfunc3var, const char *, int, ...);
DEFINE_FAKE_VALUE_FUNC_VARARG(int, valuefunc3var, const char *, int, ...);
#ifndef __cplusplus
DEFINE_FAKE_VALUE_FUNC(int, strlcpy3, char* const, const char* const, const size_t);
#endif /* __cplusplus */
DEFINE_FAKE_VOID_FUNC(voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
DEFINE_FAKE_VALUE_FUNC(int, valuefunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
#else
DEFINE_FAKE_VOID_FUNC(__cdecl, voidfunc1, int);
DEFINE_FAKE_VOID_FUNC(__cdecl, voidfunc2, char, char);
DEFINE_FAKE_VOID_FUNC(__cdecl, voidfunc1outparam, char *);

DEFINE_FAKE_VALUE_FUNC(long, __cdecl, longfunc0);
DEFINE_FAKE_VALUE_FUNC(enum MYBOOL, __cdecl, enumfunc0);
DEFINE_FAKE_VALUE_FUNC(struct MyStruct, __cdecl, structfunc0);
DEFINE_FAKE_VOID_FUNC_VARARG(__cdecl, voidfunc3var, const char *, int, ...);
DEFINE_FAKE_VALUE_FUNC_VARARG(int, __cdecl, valuefunc3var, const char *, int, ...);
#ifndef __cplusplus
DEFINE_FAKE_VALUE_FUNC(int, __cdecl, strlcpy3, char* const, const char* const, const size_t);
#endif /* __cplusplus */
DEFINE_FAKE_VOID_FUNC(__cdecl, voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
DEFINE_FAKE_VALUE_FUNC(int, __cdecl,valuefunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
#endif
#include "global_fakes.include"
52 changes: 6 additions & 46 deletions test/global_fakes.h
Original file line number Diff line number Diff line change
@@ -1,49 +1,9 @@
#ifndef GLOBAL_FAKES_H_
#define GLOBAL_FAKES_H_

#include "../fff.h"
#include "string.h"


//// Imaginary production code header file ///
enum MYBOOL { FALSE = 899, TRUE };
struct MyStruct {
int x;
int y;
};
enum MYBOOL enumfunc();
struct MyStruct structfunc();
//// End Imaginary production code header file ///

#ifndef TEST_WITH_CALLING_CONVENTIONS
DECLARE_FAKE_VOID_FUNC(voidfunc1, int);
DECLARE_FAKE_VOID_FUNC(voidfunc2, char, char);
DECLARE_FAKE_VOID_FUNC(voidfunc1outparam, char *);
DECLARE_FAKE_VALUE_FUNC(long, longfunc0);
DECLARE_FAKE_VALUE_FUNC(enum MYBOOL, enumfunc0);
DECLARE_FAKE_VALUE_FUNC(struct MyStruct, structfunc0);
DECLARE_FAKE_VOID_FUNC_VARARG(voidfunc3var, const char *, int, ...);
DECLARE_FAKE_VALUE_FUNC_VARARG(int, valuefunc3var, const char *, int, ...);
DECLARE_FAKE_VOID_FUNC(voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
DECLARE_FAKE_VALUE_FUNC(int, valuefunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
#else
DECLARE_FAKE_VOID_FUNC(__cdecl, voidfunc1, int);
DECLARE_FAKE_VOID_FUNC(__cdecl, voidfunc2, char, char);
DECLARE_FAKE_VOID_FUNC(__cdecl, voidfunc1outparam, char *);
DECLARE_FAKE_VALUE_FUNC(long, __cdecl, longfunc0);
DECLARE_FAKE_VALUE_FUNC(enum MYBOOL, __cdecl, enumfunc0);
DECLARE_FAKE_VALUE_FUNC(struct MyStruct, __cdecl, structfunc0);
DECLARE_FAKE_VOID_FUNC_VARARG(__cdecl, voidfunc3var, const char *, int, ...);
DECLARE_FAKE_VALUE_FUNC_VARARG(int, __cdecl, valuefunc3var, const char *, int, ...);
DECLARE_FAKE_VOID_FUNC(__cdecl, voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
DECLARE_FAKE_VALUE_FUNC(int, __cdecl, valuefunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
#ifdef __cplusplus
extern "C" {
#endif

#ifndef __cplusplus
#ifndef TEST_WITH_CALLING_CONVENTIONS
DECLARE_FAKE_VALUE_FUNC(int, strlcpy3, char* const, const char* const, const size_t);
#else
DECLARE_FAKE_VALUE_FUNC(int, __cdecl, strlcpy3, char* const, const char* const, const size_t);
#include "global_fakes.hpp"

#ifdef __cplusplus
}
#endif
#endif /* __cplusplus */
#endif /* GLOBAL_FAKES_H_ */
49 changes: 49 additions & 0 deletions test/global_fakes.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#ifndef GLOBAL_FAKES_H_
#define GLOBAL_FAKES_H_

#include "../fff.h"
#include "string.h"


//// Imaginary production code header file ///
enum MYBOOL { FALSE = 899, TRUE };
struct MyStruct {
int x;
int y;
};
enum MYBOOL enumfunc();
struct MyStruct structfunc();
//// End Imaginary production code header file ///

#ifndef TEST_WITH_CALLING_CONVENTIONS
DECLARE_FAKE_VOID_FUNC(voidfunc1, int);
DECLARE_FAKE_VOID_FUNC(voidfunc2, char, char);
DECLARE_FAKE_VOID_FUNC(voidfunc1outparam, char *);
DECLARE_FAKE_VALUE_FUNC(long, longfunc0);
DECLARE_FAKE_VALUE_FUNC(enum MYBOOL, enumfunc0);
DECLARE_FAKE_VALUE_FUNC(struct MyStruct, structfunc0);
DECLARE_FAKE_VOID_FUNC_VARARG(voidfunc3var, const char *, int, ...);
DECLARE_FAKE_VALUE_FUNC_VARARG(int, valuefunc3var, const char *, int, ...);
DECLARE_FAKE_VOID_FUNC(voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
DECLARE_FAKE_VALUE_FUNC(int, valuefunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
#else
DECLARE_FAKE_VOID_FUNC(__cdecl, voidfunc1, int);
DECLARE_FAKE_VOID_FUNC(__cdecl, voidfunc2, char, char);
DECLARE_FAKE_VOID_FUNC(__cdecl, voidfunc1outparam, char *);
DECLARE_FAKE_VALUE_FUNC(long, __cdecl, longfunc0);
DECLARE_FAKE_VALUE_FUNC(enum MYBOOL, __cdecl, enumfunc0);
DECLARE_FAKE_VALUE_FUNC(struct MyStruct, __cdecl, structfunc0);
DECLARE_FAKE_VOID_FUNC_VARARG(__cdecl, voidfunc3var, const char *, int, ...);
DECLARE_FAKE_VALUE_FUNC_VARARG(int, __cdecl, valuefunc3var, const char *, int, ...);
DECLARE_FAKE_VOID_FUNC(__cdecl, voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
DECLARE_FAKE_VALUE_FUNC(int, __cdecl, valuefunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
#endif

#ifndef __cplusplus
#ifndef TEST_WITH_CALLING_CONVENTIONS
DECLARE_FAKE_VALUE_FUNC(int, strlcpy3, char* const, const char* const, const size_t);
#else
DECLARE_FAKE_VALUE_FUNC(int, __cdecl, strlcpy3, char* const, const char* const, const size_t);
#endif
#endif /* __cplusplus */
#endif /* GLOBAL_FAKES_H_ */
31 changes: 31 additions & 0 deletions test/global_fakes.include
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef TEST_WITH_CALLING_CONVENTIONS
DEFINE_FAKE_VOID_FUNC(voidfunc1, int);
DEFINE_FAKE_VOID_FUNC(voidfunc2, char, char);
DEFINE_FAKE_VOID_FUNC(voidfunc1outparam, char *);

DEFINE_FAKE_VALUE_FUNC(long, longfunc0);
DEFINE_FAKE_VALUE_FUNC(enum MYBOOL, enumfunc0);
DEFINE_FAKE_VALUE_FUNC(struct MyStruct, structfunc0);
DEFINE_FAKE_VOID_FUNC_VARARG(voidfunc3var, const char *, int, ...);
DEFINE_FAKE_VALUE_FUNC_VARARG(int, valuefunc3var, const char *, int, ...);
#ifndef __cplusplus
DEFINE_FAKE_VALUE_FUNC(int, strlcpy3, char* const, const char* const, const size_t);
#endif /* __cplusplus */
DEFINE_FAKE_VOID_FUNC(voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
DEFINE_FAKE_VALUE_FUNC(int, valuefunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
#else
DEFINE_FAKE_VOID_FUNC(__cdecl, voidfunc1, int);
DEFINE_FAKE_VOID_FUNC(__cdecl, voidfunc2, char, char);
DEFINE_FAKE_VOID_FUNC(__cdecl, voidfunc1outparam, char *);

DEFINE_FAKE_VALUE_FUNC(long, __cdecl, longfunc0);
DEFINE_FAKE_VALUE_FUNC(enum MYBOOL, __cdecl, enumfunc0);
DEFINE_FAKE_VALUE_FUNC(struct MyStruct, __cdecl, structfunc0);
DEFINE_FAKE_VOID_FUNC_VARARG(__cdecl, voidfunc3var, const char *, int, ...);
DEFINE_FAKE_VALUE_FUNC_VARARG(int, __cdecl, valuefunc3var, const char *, int, ...);
#ifndef __cplusplus
DEFINE_FAKE_VALUE_FUNC(int, __cdecl, strlcpy3, char* const, const char* const, const size_t);
#endif /* __cplusplus */
DEFINE_FAKE_VOID_FUNC(__cdecl, voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
DEFINE_FAKE_VALUE_FUNC(int, __cdecl,valuefunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
#endif
4 changes: 4 additions & 0 deletions test/global_fakes_cpp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "global_fakes.hpp"
#include <cstring> // for memcpy

#include "global_fakes.include"
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,13 @@
<ItemGroup>
<ClCompile Include="..\..\fff_test_global_c.c" />
<ClCompile Include="..\..\global_fakes.c" />
<ClCompile Include="..\..\global_fakes.include" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\fff.h" />
<ClInclude Include="..\..\c_test_framework.h" />
<ClInclude Include="..\..\global_fakes.h" />
<ClInclude Include="..\..\global_fakes.hpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
Loading

0 comments on commit 920d15d

Please sign in to comment.