I am using googletest
in conjunction with gcovr
which is producing some odd behavior. I have a header file foo.h
that gcovr
claims has some lines that are not being covered under a test. These lines are the class definition and the move constructor:
File Lines Exec Cover Missing
foo.h 42 40 95% 39,47
Where line 39 is:
class foo
and line 47 is:
foo(foo&&) = default;
I have tried explicitly calling this function in a test body with std::move()
, to no avail. Is there a solution to this problem, or am I stuck with a 99% coverage report?
I should note, there is no implementation in this header apart from the class definition and the copy/move semantics (which are all defined as default
); all function bodies are in foo.cpp
.