c++ - Why my source code coverage result looks so wierd -
i'm trying find out coverage of source code gcov. , follow part of result:
328 : 8 : char* getnumber() { 329 [ + - ][ + - ]: 8 : log(__file__, __line__, class_name, "enter getaccountnumber", ""); [ + - ][ + - ] [ + - ][ + - ] [ + - ][ + - ] [ + - ] 330 [ + - ][ + - ]: 8 : log(__file__, __line__, class_name, "leave getaccountnumber", ""); [ + - ][ + - ] [ + - ][ + - ] [ + - ][ + - ] [ + - ] 331 [ + - ]: 8 : return this->number.c_str(); 332 : : } i did'n use option -coverage, , default, coverage option enable. wonder why branch data looks wierd. gcov document said:
’ + ’: branch taken @ least once ’ - ’: branch not taken ’ # ’: basic block containing branch never executed so why there 4 +/- in every line, , in line there no "line".
Comments
Post a Comment