ElectronVector / fake_function_framework

A plug-in for Ceedling to use the Fake Function Framework (fff) for mocking instead of Cmock.
MIT License
36 stars 13 forks source link

Variadic function needs newer fff #17

Closed Wurstnase closed 3 years ago

Wurstnase commented 5 years ago

Hi,

the fff got some update in case of variadic functions. https://stackoverflow.com/a/56971482/6621062

Like

// debug.h
void debug_printf(const char*, ...);

// test_some.c
// some default includes...
#include "mock_debug.h"
void debug_printf_custom(const char* fmt, va_list ap)
{
  vprintf(fmt, ap);
}

void setUp(void)
{
  debug_printf_fake.custom_fake = debug_printf_custom;
}

When installing this framework with git clone --recursive https://github.com/ElectronVector/fake_function_framework.git the fff version is outdated and will produce wrong code for variadic custom fakes.

Manually update it with checking out the fff to master will correct this issue.

mchernosky commented 3 years ago

Fixed by #21