Skip to content

Commit

Permalink
we can now recreate the python test failure in C++
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Jul 17, 2024
1 parent 2ce7856 commit f6862ac
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cpptests/test_fixation_pruning_during_simulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,26 @@ BOOST_FIXTURE_TEST_CASE(test_remove_fixations_simplify_each_generation, common_s
options.track_mutation_counts_during_sim = true;
BOOST_REQUIRE_EQUAL(options.preserve_selected_fixations, false);
BOOST_REQUIRE_EQUAL(options.track_mutation_counts_during_sim, true);
options.suppress_edge_table_indexing = !options.suppress_edge_table_indexing;
BOOST_REQUIRE_EQUAL(options.suppress_edge_table_indexing, true);
evolve_with_tree_sequences(rng, pop, recorder, 1, forward_demes_graph, 1000, 0.,
1e-3, mregions, recregions, gvalue_ptrs,
sample_recorder_callback, stopping_criterion,
post_simplification_recorder, options);
BOOST_REQUIRE_EQUAL(pop.generation, 1000);
BOOST_REQUIRE_EQUAL(pop.fixations.size(), pop.fixation_times.size());
BOOST_REQUIRE(!pop.fixations.empty());
}

BOOST_FIXTURE_TEST_CASE(test_remove_fixations_simplify_each_generation_index_tables_after_simplify, common_setup)
{
BOOST_REQUIRE_EQUAL(pop.N, 1000);
BOOST_REQUIRE_EQUAL(mregions.weights.size(), mregions.regions.size());
BOOST_REQUIRE_EQUAL(mregions.weights.size(), 1);
options.track_mutation_counts_during_sim = true;
BOOST_REQUIRE_EQUAL(options.preserve_selected_fixations, false);
BOOST_REQUIRE_EQUAL(options.track_mutation_counts_during_sim, true);
BOOST_REQUIRE_EQUAL(options.suppress_edge_table_indexing, false);
evolve_with_tree_sequences(rng, pop, recorder, 1, forward_demes_graph, 1000, 0.,
1e-3, mregions, recregions, gvalue_ptrs,
sample_recorder_callback, stopping_criterion,
Expand Down

0 comments on commit f6862ac

Please sign in to comment.