Dear Developers,
My new employers are very supportive of unit testing code. I agree that this is the best way to produce code without errors and to instantly trace problems arising from new development. For C++, the best solution available seems to be Catch. This enables rapid mocking and eliminates most of the tedium in creation of the testing framework, so long as one has C++14 which is not a big ask.
However, I don’t know what nvcc might do if confronted with #include “catch_amalgamated.hpp” when compiling a C++ code that launches CUDA kernels. Obviously, Catch is not going to mock the CUDA layer, but if I can still provide targets that the CUDA kernels are supposed to produce CATCH could still have value as an automated testing framework.
Does anyone have experience in this area? I have lots of experience writing CUDA, and my C++ chops are coming along thanks to some pointers (well, not pointers, we never want naked pointers anymore, do we?) from my colleagues. Let me know any other solutions, even imperfect workarounds, you might have tried.
Cheers!