#include <TestStormDamageApplier.h>
Public Member Functions | |
void | TestStormDamageApplier () |
Assembles all other testing functions into one test. | |
void | MakeGraphs () |
If you wish a visual test, this will output a spreadsheet for graph making. | |
Protected Member Functions | |
void | TestNormalProcessingRun1 (clSimManager *p_oSimManager) |
Tests normal processing. | |
void | TestNormalProcessingRun2 (clSimManager *p_oSimManager) |
Tests normal processing. | |
void | TestRun1Timestep1 (clTreePopulation *p_oPop) |
Checks the expected results for timestep 1 of TestNormalProcessingRun1(). | |
void | TestRun1Timestep2 (clTreePopulation *p_oPop) |
Checks the expected results for timestep 2 of TestNormalProcessingRun1(). | |
void | TestRun1Timestep3 (clTreePopulation *p_oPop) |
Checks the expected results for timestep 3 of TestNormalProcessingRun1(). | |
void | TestRun1Timestep4 (clTreePopulation *p_oPop) |
Checks the expected results for timestep 4 of TestNormalProcessingRun1(). | |
void | TestRun1Timestep5 (clTreePopulation *p_oPop) |
Checks the expected results for timestep 5 of TestNormalProcessingRun1(). | |
void | TestErrorProcessing (clSimManager *p_oSimManager) |
Tests error processing. | |
char * | WriteXMLFile1 () |
Writes the parameter file for TestNormalProcessing1(). | |
char * | WriteXMLFile2 () |
Writes the parameter file for TestNormalProcessing2(). | |
char * | WriteXMLFile3 () |
Writes the parameter file for MakeGraphs(). | |
char * | WriteXMLErrorFile1 () |
Writes an error file where the storm behavior is not also enabled. | |
char * | WriteXMLErrorFile2 () |
Writes an error file where the storm damage applier behavior is applied to seedlings. | |
char * | WriteXMLErrorFile3 () |
Writes an error file where the value for number of years to heal is not positive. | |
void | WriteCommonStuff (std::fstream &oOut) |
Writes common portions of the test parameter files. | |
void | WriteBehaviorList (std::fstream &oOut) |
Writes the behavior list for the test parameter files. |
void clTestStormDamageApplier::MakeGraphs | ( | ) |
If you wish a visual test, this will output a spreadsheet for graph making.
It will write a tab-delimited file called "StormTest.txt". There is one table for each species. It does storms at 0.02 severity intervals from 0 to 1, a thousand trees of each species, then outputs how many were no damage, medium damage, and severe damage.
void clTestStormDamageApplier::TestNormalProcessingRun1 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing.
WriteXMLFile1() writes the parameter file. Aspects of the run:
The run proceeds for 5 timesteps and the number of trees with each damage counter is checked through time.
p_oSimManager | Sim Manager object to run our test run. |
void clTestStormDamageApplier::TestNormalProcessingRun2 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing.
WriteXMLFile2() writes the parameter file. Aspects of the run:
The run proceeds for 3 timesteps and the number of trees with each damage counter is checked through time.
p_oSimManager | Sim Manager object to run our test run. |
void clTestStormDamageApplier::TestRun1Timestep1 | ( | clTreePopulation * | p_oPop | ) | [protected] |
Checks the expected results for timestep 1 of TestNormalProcessingRun1().
p_oPop | Tree population object. |
void clTestStormDamageApplier::TestRun1Timestep2 | ( | clTreePopulation * | p_oPop | ) | [protected] |
Checks the expected results for timestep 2 of TestNormalProcessingRun1().
p_oPop | Tree population object. |
void clTestStormDamageApplier::TestRun1Timestep3 | ( | clTreePopulation * | p_oPop | ) | [protected] |
Checks the expected results for timestep 3 of TestNormalProcessingRun1().
p_oPop | Tree population object. |
void clTestStormDamageApplier::TestRun1Timestep4 | ( | clTreePopulation * | p_oPop | ) | [protected] |
Checks the expected results for timestep 4 of TestNormalProcessingRun1().
p_oPop | Tree population object. |
void clTestStormDamageApplier::TestRun1Timestep5 | ( | clTreePopulation * | p_oPop | ) | [protected] |
Checks the expected results for timestep 5 of TestNormalProcessingRun1().
p_oPop | Tree population object. |
void clTestStormDamageApplier::WriteBehaviorList | ( | std::fstream & | oOut | ) | [protected] |
Writes the behavior list for the test parameter files.
oOut | File stream to write to. |
void clTestStormDamageApplier::WriteCommonStuff | ( | std::fstream & | oOut | ) | [protected] |
Writes common portions of the test parameter files.
Starts with <randomSeed> and ends with </allometry>.
oOut | File stream to write to. |
char* clTestStormDamageApplier::WriteXMLErrorFile1 | ( | ) | [protected] |
Writes an error file where the storm behavior is not also enabled.
char* clTestStormDamageApplier::WriteXMLErrorFile2 | ( | ) | [protected] |
Writes an error file where the storm damage applier behavior is applied to seedlings.
char* clTestStormDamageApplier::WriteXMLErrorFile3 | ( | ) | [protected] |
Writes an error file where the value for number of years to heal is not positive.
char* clTestStormDamageApplier::WriteXMLFile1 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing1().
char* clTestStormDamageApplier::WriteXMLFile2 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing2().
char* clTestStormDamageApplier::WriteXMLFile3 | ( | ) | [protected] |
Writes the parameter file for MakeGraphs().