Why is it a mistake to change a failing comparative test's expected value so it matches the transformed code's current output?
Select an answer to reveal the explanation.
Short Explanation
You haven't fixed anything; you've just told the test to stop complaining. Changing the expected value hides a real transformation defect and lets the transformed program keep diverging from the legacy behaviour it's meant to replace.
Full Explanation
Changing a failing comparative test's expected value to match the transformed code's current output is wrong because it makes a genuine transformation defect look resolved without correcting the code, so the program keeps diverging from the legacy behaviour it is meant to replace. Moving the goalposts turns a red flag into a green one while the underlying divergence remains and will resurface later, usually in production. The claim that rewriting expected values takes longer than diagnosing generated code is wrong because effort is not the reason; the practice is wrong even when faster. The claim that comparative tests cannot be edited once written is wrong because tests are ordinary files and can be edited; the objection is to what the edit does, not whether it is possible. The claim that transformation tools automatically revert test-file changes is wrong because they do not police test files. For the exam, a passing test only has value if the expected value it checks against is the correct one.