finish the test of class LArG4CalibSD
In this branch, I tested the class LArG4CalibSD
in the package LArCalorimeter/LArG4/LArG4Code
. Here is how I did.
- I place my test code
LArG4CalibSD_gtest.cxx
in thetest
folder. And it is for testing the classLArG4CalibSD
. - I created the jobOption file
optionForTest.txt
, which is placed in the share folder. - In oder to add my test classes as friends of the tested classes, I add several lines for that.
- Of course, I add some lines in the CMakeLists.txt for compiling my test code, using google test frame work, and so on.
- I define a class
DerivedILArCalibCalculatorSvcForTest
derived from the classILArCalibCalculatorSvc
, which is a abstract class. The class is in the fileDerivedILArCalibCalculatorSvcForTest.h
, and I used it in my test code. - It is worth mentioning that I use different TEST_F to test different member functions of the tested class.
Edited by Liangliang Han