10 [ + - ][ + - ] : 2 : Conf::~Conf() {}
11 : :
12 : :
13 : 2 : Conf::Conf( std::string filename, std::string delimiter,
14 : : std::string comment )
15 [ + - ][ + - ]: 2 :: m_Delimiter(delimiter), m_Comment(comment)
16 : : {
17 : : // Construct a Conf, getting keys and values from given file
18 : :
19 [ + - ][ + - ]: 4 : std::ifstream in( filename.c_str() );
[ + - ]
20 : :
21 [ + - ][ - + ]: 2 : if( !in ) throw File_not_found( filename );
[ # # ]
22 : :
23 [ + - ]: 2 : in >> (*this);
24 : 2 : }
The code-coverage report as above. For the class Conf, the hit count of constructor is 2, but the hit count of this line std::ifstream in( filename.c_str() );
is 4 which I think it should be 2 too.
How do you think about the different hit count in this code-coverage report, is it a bug
of lcov
or meaningful?