-
Notifications
You must be signed in to change notification settings - Fork 34
Failing unit test on NOP #258
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
Comments
My branch / PR for #256 has some changes to the location of the I'm wondering what happens if you try |
Same problem - https://github.com/RobTillaart/MCP23017_RT/runs/1634781952 |
The issue is that I'm trying to use a macro to replace a builtin function... and that has consequences for things that happen to be named
|
I was able to reproduce the error locally, and I think this is now fixed in the PR branch |
void MCP23017::pinMode(uint8_t pin, uint8_t value) This is exactly the reason why I would recommend using inline functions over macros wherever possible. |
No argument here. All those macros are holdovers from the early days of this project where I wasn't even sure that the project would even compile! I had much bigger problems than hastily implementing no-op compilation mocks as macros. Honestly, if there are any improvements you can suggest to the process of mocking a microprocessor compilation system for the purpose of unit testing... I'll gladly follow that advice. There really weren't any guideposts for a project like this when I started, and I consider it a small miracle that it's accomplished so much. |
@ianfixes |
The biggest unknown at this point is how to make the most efficient progress toward mocking avr-libc. If anyone is aware of some sort of pre-existing compatibility layer (providing all of avr-libc to non-avr architecture compilation) please let me know. |
Has something changed in the NOP definition?
https://github.com/RobTillaart/MCP23017_RT/actions/runs/456403915
In file included from /github/home/Arduino/libraries/MCP23017_RT/MCP23017.h:10,
from /github/home/Arduino/libraries/MCP23017_RT/MCP23017.cpp:20:
/action/bundle/ruby/2.6.0/bundler/gems/arduino_ci-d86200aa8b3b/cpp/arduino/Arduino.h:40:16: error: expected unqualified-id before ‘do’
#define _NOP() do { 0; } while (0)
^~
The text was updated successfully, but these errors were encountered: