Project

General

Profile

Support #882

Unit testing for mappers

Added by Santos, Edward over 10 years ago. Updated over 10 years ago.

Status:
Rejected
Priority:
Normal
Category:
Testing
Target version:
Start date:
25 January 2012
Due date:
% Done:

0%

Estimated time:
Workflow:
New Issue

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

#1

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)

#2

Updated by Santos, Edward over 10 years ago

If you think it's not worth introducing the cpp unit test functionality for mappers, I'll just do it in python.

#3

Updated by Rogers, Chris over 10 years ago

  • Status changed from Open to Rejected

Okay

Also available in: Atom PDF