TEST(PopulationGeneration, GeneratedPopulationFitsModel) generates a population and asserts that it fits the model it was generated from.
TEST(PopulationGeneration, GeneratedPopulationIsInfectious) is an integration tests: it runs a brief simulation with a generated population and asserts that the simulated disease acutally spreads through this population.
TEST(GeoPosition, SampleCalculation) checks a calculation of the distance between two GeoPositions. (There was a bug in the GeoPosition distance calculation used by the generator, so I’ve replaced it with some code that uses boost::geometry instead of reinventing the wheel.)
I added some more logging calls to the population generator, and split some code from PopulationBuilder.cpp into a new method called population::Generator::FromConfig.
This PR adds three test cases:
TEST(PopulationGeneration, GeneratedPopulationFitsModel)
generates a population and asserts that it fits the model it was generated from.TEST(PopulationGeneration, GeneratedPopulationIsInfectious)
is an integration tests: it runs a brief simulation with a generated population and asserts that the simulated disease acutally spreads through this population.TEST(GeoPosition, SampleCalculation)
checks a calculation of the distance between two GeoPositions. (There was a bug in theGeoPosition
distance calculation used by the generator, so I’ve replaced it with some code that usesboost::geometry
instead of reinventing the wheel.)I added some more logging calls to the population generator, and split some code from
PopulationBuilder.cpp
into a new method calledpopulation::Generator::FromConfig
.