#462·Rust

Redundant & different test cases for different algorithms solving the same problem

Author: appgurueuCreated Feb 19, 2023Updated Oct 8, 2023
Labelsdont-close

Consider e.g. the sorting algorithms: They all solve the same problem, yet each has its own test cases. This is only warranted if the tests are to test implementation details.

However, the better approach here is to write one comprehensive test suite - perhaps even using fuzzing - and testing all implementations against it. This will both increase coverage and reduce test duplication.