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++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
{count} votes

Your answer

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