Support #882
Unit testing for mappers
0%
Description
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?
Edward
Updated by Rogers, Chris over 11 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)
Updated by Santos, Edward over 11 years ago
If you think it's not worth introducing the cpp unit test functionality for mappers, I'll just do it in python.