Unit testing for mappers
Trying to write a cpp unit test for a Cpp mapper. During compile, I get the
undefined reference to <function>
error message. The issue is that my function declaration is found (compiler knows what the arguments of the function are...) and it also finds the function implementation IF the function is implemented inline in the header file. However, it misses it when the function is implemented in the .cc file. Is this a build feature?
Updated by Rogers, Chris over 10 years ago
- Category set to Testing
- Assignee set to Santos, Edward
- Target version set to Future MAUS release
Testing mappers in C++ is not supported - you need to call the map class using the SWIG interface and use python. See, for example, tests for MapCppSimulation. Do you need to do this in C++? I could probably find a way...
(tests for MapCppSimulation are in src/map/MapCppSimulation/test_MapCppSimulation.py)