Skip to content

Issue with mocking header inline functions and defines #868

@lafonso-gnrc

Description

@lafonso-gnrc

Hello,

I'm trying to unit test a piece of software that will use some embedded libraries for a microcontroller.
Said libraries have quite a few inline functions in the header.

I tried using the CMock option :treat_inlines: :include and I do have use_test_preprocessor: TRUE. This does not work because all the defines get erased.

With use_test_preprocessor: FALSE the problem I have is that I get the following errors:

build/test/mocks/mock_stm32h5xx_ll_tim.h:2627:1: error: multiple storage classes in declaration specifiers
2627 | typedef __STATIC_INLINE void (* CMOCK_LL_TIM_GenerateEvent_BRK2_CALLBACK)(TIM_TypeDef* TIMx, int cmock_num_calls);

Any advice on how to proceed? Am I missing some option?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions