Regression Testing

You have refactored the calculator several times on the journey to making it a full-fledged object-oriented program. Each time, you have been asked to run regression tests. Regression tests for the calculator have probably consisted of some set of requests that use all the operators. But in a professional situation, it is a good idea to run a fixed set of tests after each refactoring, repair, or enhancement.

Writing Test Inputs and Outputs to Files

Test harnesses can simplify the process of creating regression tests.

If you have a manual test harness, you can use it to prepare files for a comprehensive test harness. The manual test harness can prompt for inputs, record them, get the results, and prompt for confirmation that ...

Get SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.