Tests the clMortalityOrg class.
WriteXMLFile1() will create the parameter file for this run. In the file:
-
Two species, Species 1 and Species 2.
-
A stochastic mortality behavior that kills everything to which it is applied. It is applied to adults of Species 2. This behavior should be first, to make sure it's the hooked one.
-
A stochastic mortality behavior that kills none of the trees to which it is applied. It is applied to saplings of Species 2.
-
A self-thinning behavior that kills none of the trees to which it is applied. It is applied to saplings of species 2.
This function will:
-
Make sure that saplings and adults of species 2 each have one bool data member. It does this by making sure that "dead" has been registered for both. It will then attempt to register a bool data member on all types, all species, and will throw an error if it is successful (which means that the wrong bool data member count was passed to the tree population).
-
Make sure that the behaviors are applied correctly. 10 trees of each of Species 1 saplings and adults and Species 2 saplings and adults are created. Then the model is run one timestep. All Species 2 adults should be gone and everything else should be left. (My concern is mainly to make sure that the hooked behavior works right.)