Write new Rust tests for Rust code.
If a path doesn't include
, assume it to be in the
directory. E.g.
becomes
src/redisearch_rs/numeric_range_tree
.
If a path points to a directory, consider all Rust files in that directory.
Ensure that all public APIs are tested thoroughly, including edge cases, error conditions and branches.
Use
to determine which lines are not covered by tests.
Before writing each test, explicitly identify which branch or code path it will cover that no existing test already covers. An uncovered line is not sufficient justification — ask why it is uncovered and whether it is reachable through an already-tested entry point.
Two tests are redundant if they exercise the same set of branches in the code under test. Differing only in input values that don't change control flow is not a distinct scenario.
After adding tests, double check that every new test covers at least one branch that no other test (existing or new) covers. Remove any that don't.