#include <TestMicroEstablishment.h>
Public Member Functions | |
void | TestMicroEstablishment () |
Collection of other tests. | |
Protected Member Functions | |
void | TestErrorProcessing (clSimManager *p_oSimManager) |
Tests error processing. | |
void | TestSetZAndRespite (clSimManager *p_oSimManager) |
Tests the functions clMicroEstablishment::SetFreshLogZAndRespite, SetMoundZAndRespite, and SetGroundZAndRespite. | |
void | TestMoundZDistributions (clSimManager *p_oSimManager) |
Produces 1000 seeds in cell 0,0, and lets them all germinate (by setting substrate favorabilities to 1). | |
void | TestFreshLogZDistributions (clSimManager *p_oSimManager) |
Tests the function clMicroEstablishment::SetFreshLogZAndRespite, to make sure that seedling z heights are properly distributed. | |
void | TestGetSubstrateProportions (clSimManager *p_oSimManager) |
Tests the function clMicroEstablishment::GetSubstrateProportions. | |
void | TestGetFreshLogProportions (clSimManager *p_oSimManager) |
Tests the function clMicroEstablishment::GetFreshLogProportions. | |
char * | WriteXMLFile1 () |
Writes a parameter file that sets up 6 species, 3 of which get establishment. | |
char * | WriteXMLFile2 () |
Writes a parameter file that sets up 1 species. | |
char * | WriteXMLFile3 () |
Writes a parameter file that sets up 6 species, 3 of which get establishment. | |
char * | WriteXMLErrorFile1 () |
Writes a parameter file that contains a mound proportion that is negative. | |
void | WriteCommonStuff (std::fstream &oOut) |
Writes common portions of the test parameter files (tree pop, plot, etc). |
void clTestMicroEstablishment::TestErrorProcessing | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests error processing.
WriteXMLErrorFile1 is written to see if the expected errors are triggered.
p_oSimManager | Sim manager object. |
void clTestMicroEstablishment::TestFreshLogZDistributions | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests the function clMicroEstablishment::SetFreshLogZAndRespite, to make sure that seedling z heights are properly distributed.
This places 1000 cells in cell 0,0, and lets them all germinate. The substrate type is set to all fresh log. WriteXMLFile3() is used to set up. Then the z's of the seedlings are collected and written to FreshLogZ.txt.
void clTestMicroEstablishment::TestGetFreshLogProportions | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests the function clMicroEstablishment::GetFreshLogProportions.
There are three setup files: WriteXMLFile2(), WriteXMLFile3(), and WriteXMLFile5(). For all three, specific substrate proportions are assigned to cells and the results compared.
p_oSimManager | Sim manager object. |
void clTestMicroEstablishment::TestGetSubstrateProportions | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests the function clMicroEstablishment::GetSubstrateProportions.
There are three setup files: WriteXMLFile2(), WriteXMLFile3(), and WriteXMLFile5(). For all three, specific substrate proportions are assigned to cells and the results compared. Then we check seed distribution by checking the number of seedlings out of an original 100 that have z values greater than 0.
p_oSimManager | Sim manager object. |
void clTestMicroEstablishment::TestMoundZDistributions | ( | clSimManager * | p_oSimManager | ) | [protected] |
Produces 1000 seeds in cell 0,0, and lets them all germinate (by setting substrate favorabilities to 1).
WriteXMLFile3() gives us the setup file, with mound proportion = 1. The substrate type is set to all moss (so fresh logs don't interfere). Then the z's of the seedlings will be collected and written to MoundZ.txt.
p_oSimManager | Sim manager object. |
void clTestMicroEstablishment::TestSetZAndRespite | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests the functions clMicroEstablishment::SetFreshLogZAndRespite, SetMoundZAndRespite, and SetGroundZAndRespite.
It passes in a seedling to each to see if the expected results are correct for the last two (greater than 0 for z and 0 for respite in the first case, 0 for both z and respite in the second case). Then 1000 seeds of species 2 are added to cell (0,0) and the substrate set to all fresh logs. The fresh log proportions array will be split evenly between the four possible ages: 0, 2, 4, and 6. Then the seedlings are checked to make sure they're roughly equal to those ages.
p_oSimManager | Sim manager object. |
void clTestMicroEstablishment::WriteCommonStuff | ( | std::fstream & | oOut | ) | [protected] |
Writes common portions of the test parameter files (tree pop, plot, etc).
This ends with </allometry>.
oOut | File stream to write to. |
char* clTestMicroEstablishment::WriteXMLErrorFile1 | ( | ) | [protected] |
Writes a parameter file that contains a mound proportion that is negative.
char* clTestMicroEstablishment::WriteXMLFile1 | ( | ) | [protected] |
Writes a parameter file that sets up 6 species, 3 of which get establishment.
char* clTestMicroEstablishment::WriteXMLFile2 | ( | ) | [protected] |
Writes a parameter file that sets up 1 species.
All favorabilities are set to 1. Mound proportion is set to 1. Mound mean height is 3 m. Mound standard deviation is 0.5 m.
char* clTestMicroEstablishment::WriteXMLFile3 | ( | ) | [protected] |
Writes a parameter file that sets up 6 species, 3 of which get establishment.
All favorabilities are set to 1. Mound proportion is set to 0.