#include <TestPuertoRicoEstablishment.h>
Public Member Functions | |
void | TestPuertoRicoEstablishment () |
Tests the clPuertoRicoEstablishment class. | |
Protected Member Functions | |
void | TestNormalProcessing (clSimManager *p_oSimManager) |
This tests normal processing. | |
void | TestErrorProcessing (clSimManager *p_oSimManager) |
Tests error processing. | |
char * | WriteXMLFile1 () |
Writes a setup file. | |
char * | WriteXMLErrorFile1 () |
Writes a file where a light extinction coefficient is not between 0 and 1. | |
char * | WriteXMLErrorFile2 () |
Writes a file where the value for m_fLightHeight is not zero or greater. | |
char * | WriteXMLErrorFile3 () |
Writes a file where the value for mp_fOptimumGLI is not between 0 and 100. | |
char * | WriteXMLErrorFile4 () |
Writes a file where there is no disperse behavior. | |
char * | WriteXMLErrorFile5 () |
Writes a file where there is no storm behavior. | |
char * | WriteXMLErrorFile6 () |
Writes a file where the number of altitude angles is less than 1. | |
char * | WriteXMLErrorFile7 () |
Writes a file where the number of azimuth angles is less than 1. | |
void | WriteCommonStuff (std::fstream &oOut) |
Writes common portions of the test parameter files (tree pop, plot, etc). |
void clTestPuertoRicoEstablishment::TestErrorProcessing | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests error processing.
It checks for the following errors:
void clTestPuertoRicoEstablishment::TestNormalProcessing | ( | clSimManager * | p_oSimManager | ) | [protected] |
This tests normal processing.
A plot is set up and a set of trees added designed to give target GLI values to certain "Dispersed Seed" grid cells. Mostly there is only one neighbor, and the trees are placed such that the GLI point is completely within their canopies, to make test calculations easy. (GLI calculations themselves don't need testing here.) A given number of seeds of species 2, 3, and 4 is added to each of 9 grid cells. The run goes, and then we check that the appropriate number of seedlings of each species in each cell exists. WriteXMLFile1() writes the parameter file.
p_oSimManager | Sim Manager object. |
void clTestPuertoRicoEstablishment::WriteCommonStuff | ( | std::fstream & | oOut | ) | [protected] |
Writes common portions of the test parameter files (tree pop, plot, etc).
oOut | File stream to write to. |
char* clTestPuertoRicoEstablishment::WriteXMLErrorFile1 | ( | ) | [protected] |
Writes a file where a light extinction coefficient is not between 0 and 1.
char* clTestPuertoRicoEstablishment::WriteXMLErrorFile2 | ( | ) | [protected] |
Writes a file where the value for m_fLightHeight is not zero or greater.
char* clTestPuertoRicoEstablishment::WriteXMLErrorFile3 | ( | ) | [protected] |
Writes a file where the value for mp_fOptimumGLI is not between 0 and 100.
char* clTestPuertoRicoEstablishment::WriteXMLErrorFile4 | ( | ) | [protected] |
Writes a file where there is no disperse behavior.
char* clTestPuertoRicoEstablishment::WriteXMLErrorFile5 | ( | ) | [protected] |
Writes a file where there is no storm behavior.
char* clTestPuertoRicoEstablishment::WriteXMLErrorFile6 | ( | ) | [protected] |
Writes a file where the number of altitude angles is less than 1.
char* clTestPuertoRicoEstablishment::WriteXMLErrorFile7 | ( | ) | [protected] |
Writes a file where the number of azimuth angles is less than 1.
char* clTestPuertoRicoEstablishment::WriteXMLFile1 | ( | ) | [protected] |
Writes a setup file.
This contains 4 species, one unused (species 1; this helps catch array-index problems). Non-spatial disperse is applied to adults of all species, with values such that no seeds will be dispersed from any trees. Species 2-4 get Puerto Rico establishment.