This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NCS IS_ENABLED macro and unit tests

Hello everyone,

I have added some unit tests to my project and some of them are failing because it seems like the IS_ENABLED macro is not evaluated correct. Even though I added the respective Kconfig define to the target_compile_options. The module has a number of Kconfig options to en-/disable certain functionality. In the code I check with the IS_ENABLED macro if such an option is enabled and then do something. You can find a basic example of what I have done in the archive below.

For the basic setup I followed this guide:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/nrf/ug_unity_testing.html

Has anyone experienced a similar issue and has a solution for it?

Thanks in advance!

Parents Reply Children
No Data
Related