SORTIE C++ Test Documentation
|
This class tests the spatial dispersal behavior. More...
#include <TestSpatialDispersal.h>
Public Member Functions | |
void | TestSpatialDisperse () |
Performs the total test of disperse by calling TestDispersal1 and TestDispersal2. | |
Private Member Functions | |
void | TestDispersal1 (clSimManager *p_oSimManager) |
Creates a test suite of all the test cases in this object. | |
void | TestDispersal2 (clSimManager *p_oSimManager) |
Tests spatial dispersal using the second set of conditions. | |
void | VerifyXMLFile1Timestep1 (clGrid *p_oSeedGrid) |
Verifies the numbers of seeds for timestep 1 during TestDispersal1. | |
void | VerifyXMLFile1Timestep2 (clGrid *p_oSeedGrid) |
Verifies the numbers of seeds for timestep 2 during TestDispersal1. | |
void | VerifyXMLFile2 (clGrid *p_oSeedGrid) |
Verifies the numbers of seeds during TestDispersal2. | |
const char * | WriteXMLFile1 () |
Writes a parameter file to direct testing using the first set of testing conditions. | |
const char * | WriteXMLFile2 () |
Writes a parameter file to direct testing using the second set of testing conditions. | |
This class tests the spatial dispersal behavior.
It writes out parameter files and uses them as input to perform setup; it then sets up the desired initial conditions, causes the behavior to run, then tests its output.
Two runs will be tested: one in which the timestep length is 1 year and the dimensions of the seed grid are explicitly set to 2X4 m, and one in which the timestep length is 4 years and the dimensions of the seed grid are left to default. The first parameter file is run for 2 timesteps to ensure that the seed grid is cleared between timesteps.
|
private |
Creates a test suite of all the test cases in this object.
I'm putting it here so it will be easier to see and add new cases to.
p_oSimManager | Sim manager object. |
|
private |
Tests spatial dispersal using the second set of conditions.
It will cause a parameter file to be written and then passed to a clSimManager object. This object will read it. The disperse behavior is run and the contents of the seed grid examined.
p_oSimManager | Sim manager object. |
void clTestSpatialDispersal::TestSpatialDisperse | ( | ) |
Performs the total test of disperse by calling TestDispersal1 and TestDispersal2.
|
private |
Verifies the numbers of seeds for timestep 1 during TestDispersal1.
|
private |
Verifies the numbers of seeds for timestep 2 during TestDispersal1.
This checks two things: one, that the number of seeds got cleaned out during timestep cleanup, and two, that the stump was removed. (So the number of seeds for one species will be slightly different.)
|
private |
Verifies the numbers of seeds during TestDispersal2.
|
private |
Writes a parameter file to direct testing using the first set of testing conditions.
This contains all tree information and disperse information. It also has a tree map so we'll be dealing with a known list of trees.
|
private |
Writes a parameter file to direct testing using the second set of testing conditions.
This contains all tree information and disperse information. It also has a tree map so we'll be dealing with a known list of trees.