softwareconstruction240 / autograder

Autograder for BYU's CS 240 Chess project
https://cs240.click
2 stars 2 forks source link

Suppress expected warning output in tests #374

Closed frozenfrank closed 1 month ago

frozenfrank commented 1 month ago

Previously, the LateDayCalculatorTest's would generate error output as they intentionally fed poorly formatted data to the functions and tested the results. While we do intend to warn developers as they work on these kinds of adjustments, it is not good practice to have error output hitting the console when the tests run.

The PR introduces a new quiet mode that addresses this problem. The tests use overloads of the methods that enable them to disable the warning output, but the production code still runs with the output enabled.