Issues with using Assert.hpp

Hi,
I’m trying to use #include „Arp/System/Commons/Testing/Assert.hpp“ todo some unit testing. However, when this header is included and I run a build I get this error.

[cmake]: /opt/plcnext_axcf2152_sdk_2023/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-pxc-linux-gnueabi/gcc/arm-pxc-linux-gnueabi/11.3.0/real-ld: CMakeFiles/StarterKit.dir/src/StarterKitProgram.cpp.o: in function _GLOBAL__sub_I_StarterKitProgram.cpp': [cmake]: StarterKitProgram.cpp:(.text.startup+0xec): undefined reference to vtable for boost::unit_test::unit_test_log_t’
[cmake]: collect2: error: ld returned 1 exit status
[cmake]: gmake[2]: *** [CMakeFiles/StarterKit.dir/build.make:206: libStarterKit.so] Error 1
[cmake]: gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/StarterKit.dir/all] Error 2
[cmake]: gmake: *** [Makefile:136: all] Error 2
cmake process exited with error

Any help or pointing in the right direction will be most helpful.

Thanks,
Adam

Hi Adam.
I’ve just spoken with the developers and the bad news is that the Arp::System::Commons::Testing namespace (and its contents) should not have been included in the SDK, or in the public API documentation. Unfortunately it’s currently not possible to use those classes for testing user code. Those files will be removed from future versions of the SDK.
Sorry for the inconvenience.

Hi Martin,
Thanks for the reply. When you say currently not possible, does that mean in the future there might be some type of support for unit testing?

Hi Martin,</p>Thanks for the reply. When you say currently not possible, does that mean in the future there might be some type of support for unit testing?</p>

There might be, but unfortunately this isn’t likely in the near future. This would require some development and documentation effort that currently isn’t scheduled. I know this would be handy for the for the automated testing of ARP components, so hopefully it’s something that will be possible at some point.