Skip to content

Mocking fails when '-' character is in file name. #1118

@jtarbotton

Description

@jtarbotton

I had a test that worked a couple years ago. The unit testing fell by the wayside. Now I am getting it back working. I updated to v1.0.1 since I had a lot of changes to make anyway. Now there is a file that was not getting mocked, "GPIO-Atlas_test.h". Thought it was a path problem so I renamed the file to "mock_GPIO-Atlas_test.h" so the build would continue. Then a second file had the same issue, "read-sensors.h". I noticed both files contained a '-' character. Since the first file was only referenced one place I renamed it to "GPIO_Atlas_test.h". Now the renamed file gets mocked as desired.

JohnT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions