Skip to content

[BUG] An error occurred when the constructor of a global instance called the mock method #25

@cagdasyesildag

Description

@cagdasyesildag

Hello,

I am testing C-Mock extension. Everything seems good. I can mock C type functions.

But, one of this mocked functions is called from a class's constructor. When I define a global instance, I get error from cmock-function-mockers.h, line=100. (error msg= Neither mock nor real function is present)

I made a change as below. It fixed my problem. Is there any better solution that you recommend?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions