Copilot generates tests for a tax calculator. Every assertion uses values computed by copying the implementation's own formula into the test. What is the best improvement?

Published
  1. Accept the tests if they achieve full line coverage.
  2. Increase the number of random inputs while calculating every expected result with the same formula.
  3. Replace or supplement those expectations with independently verified examples and boundary cases from the requirements.
  4. Remove expected-value assertions and check only that the function returns a number.

Comments — 0