Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to 'fakeit::UnexpectedMethodCallException' #58

Open
graial opened this issue Mar 29, 2024 · 0 comments
Open

Failing to 'fakeit::UnexpectedMethodCallException' #58

graial opened this issue Mar 29, 2024 · 0 comments

Comments

@graial
Copy link

graial commented Mar 29, 2024

In my attempt to incorporate ArduinoFake into an example project using CppUTest:
https://github.com/graial/ArduinoFake-cpputest

I'm now failing to target the source file under test.

Within your wiring-blink example, you manage to mock out the Arduino system calls with ArduinoFake, and then call loop() and setup() from the source file.

This is currently failing for me, probably because of something wrong in CmakeLists.txt

a call to loop() triggers fakeit::UnexpectedMethodCallException rather than the loop() in blink.cpp.

Alternatively, if I try to just link the object, I get a redefinition error.

Do you have any idea how to get cmake to look for loop() in the source file? rather than in ArduinoFake?

Or is there some way to flag the loop() function so that it doesn't get passed to ArduinoFake?

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant