Partial Code Coverage in Google test for ASSERT and EXPECT

NewCodee 1 Reputation point
2021-12-15T09:34:12.213+00:00

I have the following sample piece of code in google test project:

TEST(methodName, testcase) {
EXPECT_EQ(1, 1);
EXPECT_TRUE(true);

}

When I analyze code coverage in visual studio 2019 enterprise, I am getting partial code coverage
157865-image.png

What changes needs to be done to get full code coverage?

Developer technologies Visual Studio Testing
Developer technologies C++
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.