Skip to content

Add unit tests for sim::summarize - #19

Open
goelakash wants to merge 1 commit into
zachmatson:mainfrom
goelakash:tests/summarize
Open

Add unit tests for sim::summarize#19
goelakash wants to merge 1 commit into
zachmatson:mainfrom
goelakash:tests/summarize

Conversation

@goelakash

Copy link
Copy Markdown
Contributor

Addresses #8

Summary

  • Adds 20 inline unit tests for all functions in core/src/sim/summarize.rs
  • Covers: avg_W, sum_N_and_avg_W, marker_1_ratio, stdev_W, stdev_accumulated_muts, max_W, max/min/mean_accumulated_muts, genotype_count, shannon_diversity
  • Uses hand-calculated expected values with approx crate for float assertions

Test plan

  • cargo test -p steps_core passes all 20 tests

Tests cover all summary statistics functions: avg_W, sum_N_and_avg_W,
marker_1_ratio, stdev_W, stdev_accumulated_muts, max_W,
max/min/mean_accumulated_muts, genotype_count, and shannon_diversity.
@goelakash

Copy link
Copy Markdown
Contributor Author

@zachmatson this is ready for review when you get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant