Closed richelbilderbeek closed 5 years ago
Is your feature request related to a problem? Please describe.
Currently, can_eat is tested as such:
can_eat
// Test can_eat { for (agent_type a : collect_all_agent_types()) { can_eat(a); } }
It tests that can_eat 'does something'.
It would be superior if it actually tests the food web.
Describe the solution you'd like
Replace the test by a multiple simple food web tests:
Something like this:
assert(can_eat(agent::cow) == { agent::grass} ); //Will not compile!
Yup, this will not compile, as one cannot use { and } in an assert, so you'll have to find a better way yourself.
{
}
Test for the whole implented food web. These will indeed be multiple simple tests, e.g. 'Cow can eat grass', and so the like...
Describe alternatives you've considered
None.
Additional context
The difficulty of this Issue is suitable for experienced juniors.
I will open up this Issue for the devs of tonight :rainbow:
Is your feature request related to a problem? Please describe.
Currently,
can_eat
is tested as such:It tests that
can_eat
'does something'.It would be superior if it actually tests the food web.
Describe the solution you'd like
Replace the test by a multiple simple food web tests:
Something like this:
Yup, this will not compile, as one cannot use
{
and}
in an assert, so you'll have to find a better way yourself.Test for the whole implented food web. These will indeed be multiple simple tests, e.g. 'Cow can eat grass', and so the like...
Describe alternatives you've considered
None.
Additional context
The difficulty of this Issue is suitable for experienced juniors.