when the compile flag used by COVER and CT are different.
The preprocessed files are used to measure coverages. Different compile flags may result in different preporcessed files. In this case, set the compile flags of COVER and CT identically, execute the tests again, and export/import coverages.
void testFunction(){
int a;
int b;
//In the case of adding CT_FLAG macro in CT and not adding it in COVER, or vice versa.
#ifdef CT_FLAG
callFunction();
#endif
}
When differently calculate the bodyhash of the same funcion.
Importing coverage may fail if the bodyhash value of the same function is differently calculated in COVER and CT In this case, add EXCLUDE_BODYHASH_CVG_IMPORT=true
option to ut.ini
file, so that you can import coverage even if the bodyhash values are different.
ut.ini
path :project_path\.csdata\ut.ini
Need more help with this?
Don’t hesitate to contact us here.