Home > User Support > QTE

FAQ / QTE (Quality Town for Embedded Grade)

yQTE21zTest Creation Issue

QTE21_01 : Google Test, Template

yquestionz
Coverage of member functions of the template class under test is 0%.B

yAnswerz
If the target template class is not instantiated in the source file under test, the coverage will be 0%.
Therefore, if the target template class is not used in the source file under test,
it is necessary to explicitly instantiate the template class.

Instantiate the template class by adding a declaration to the source file to be tested as follows.

Example) When instantiating the template class Calc defined in calc.h

#include "calc.h"

template class Calc;

Search for related support information.

yGoogle Search in Support Information Sitez

search keywordF@

Other Keyword Search




Reference information and links