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?

C++
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.
3,441 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
319 questions
{count} votes