Fill This Form To Receive Instant Help
Homework answers / question archive / You are a senior software developer on a team of software developers who are responsible for a large banking web application
You are a senior software developer on a team of software developers who are responsible for a large banking web application. Your manager has recently learned about the best practice of creating unit tests for software and wants to see a full example of how it works. Another developer on the team started creating a unit test for the std::vector class, and he managed to get the TextFixture and a few tests completed before his vacation started. Your manager is impatient and has asked you to complete the task. He wants to see a number of tests, including positive and negative tests.
Key Concepts
Test(1+1) = 2
.Test(5/0) => Divide By Zero
.The following are some essential notes:
EnsureNumberIsPositive
. C++ assert / static_assert
with the Google Test ASSERT
and EXCEPT
.
EXPECT_xxx
or ASSERT_xxx
macros?
ASSERT
when failure should terminate processing, such as the reason for the test case.EXPECT
when failure should notify, but processing should continue.You will learn to do the following:
Test the existing source code in the test.cpp file using the Google unit testing framework. Include a brief written summary of the process you used, the issues you found, and how you managed the issues.
Specifically, address the following in a static testing summary:
ASSERT
and EXPECT
functionality to prove the tests. Each test you run must explicitly prove the defined condition of the test.Already member? Sign In