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 : }
上記のコードカバレッジレポート。クラス Conf の場合、コンストラクタのヒット数は 2 ですが、この行のヒット数std::ifstream in( filename.c_str() );
は 4 であり、これも 2 である必要があると思います。このコード カバレッジ レポートのさまざまなヒット数についてどう思いますか?それはバグですか、lcov
それとも意味がありますか?