stacks-core icon indicating copy to clipboard operation
stacks-core copied to clipboard

Mutation Tests clarity/src/vm/costs/mod.rs > load_costs

Open ASuciuX opened this issue 9 months ago • 0 comments

Related #4587

The mutation testing highlighted there are missing unit tests for load_costs.

The steps for making sure the load_costs function has its possible outcomes caught are:

  • [ ] remove the skip header
  • [ ] check what are the highlighted missing outcomes:
    • [ ] run
    RUST_BACKTRACE=1 BITCOIND_TEST=1 cargo mutants -vV -F "replace TrackerData::load_costs" -E ": replace .{1,2} with .{1,2} in " --baseline=skip --test-tool=nextest -- --run-ignored all --no-fail-fast --test-threads 1
    
    • should display something like this
    MISSED   clarity/src/vm/costs/mod.rs:791:9: replace TrackerData::load_costs -> Result<()> with Ok(()) in 66.8s build + 37.7s test
    
  • [ ] add test for Err cases

ASuciuX avatar May 29 '24 12:05 ASuciuX