[yul-phaser] Population: Add operator+()

This commit is contained in:
cameel
2020-02-18 19:40:37 +01:00
committed by Kamil Śliwak
parent ecb30c670f
commit d9c5e2dc9f
3 changed files with 29 additions and 0 deletions
+9
View File
@@ -261,6 +261,15 @@ BOOST_FIXTURE_TEST_CASE(run_should_not_make_fitness_of_top_chromosomes_worse, Po
}
}
BOOST_FIXTURE_TEST_CASE(plus_operator_should_add_two_populations, PopulationFixture)
{
BOOST_CHECK_EQUAL(
Population(m_program, {Chromosome("ac"), Chromosome("cx")}) +
Population(m_program, {Chromosome("g"), Chromosome("h"), Chromosome("iI")}),
Population(m_program, {Chromosome("ac"), Chromosome("cx"), Chromosome("g"), Chromosome("h"), Chromosome("iI")})
);
}
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE_END()