SORTIE C++ Test Documentation
Public Member Functions | Protected Member Functions | List of all members
clTestVolumeCalculator Class Reference

Tests the class clVolumeCalculator. More...

#include <TestVolumeCalculator.h>

Inheritance diagram for clTestVolumeCalculator:

Public Member Functions

void TestVolumeCalculator ()
 Performs all the tests from one function.
 

Protected Member Functions

void TestNormalProcessing (clSimManager *p_oSimManager)
 Tests normal processing.
 
void TestErrorProcessing (clSimManager *p_oSimManager)
 Tests error processing.
 
void NormalRun1 (clSimManager *p_oSimManager)
 Performs the first normal processing run.
 
void NormalRun2 (clSimManager *p_oSimManager)
 Performs the second normal processing run.
 
void NormalRun3 (clSimManager *p_oSimManager)
 Performs the third normal processing run.
 
void NormalRun4 (clSimManager *p_oSimManager)
 Performs the fourth normal processing run.
 
void NormalRun5 (clSimManager *p_oSimManager)
 Performs the fifth normal processing run.
 
const char * WriteXMLFile1 ()
 Writes the parameter file for NormalRun1().
 
const char * WriteXMLFile2 ()
 Writes the parameter file for NormalRun2().
 
const char * WriteXMLFile3 ()
 Writes the parameter file for NormalRun3().
 
const char * WriteXMLFile4 ()
 Writes the parameter file for NormalRun4().
 
const char * WriteXMLFile5 ()
 Writes the parameter file for NormalRun5().
 
const char * WriteXMLErrorFile1 ()
 Writes an error file where the stump height is less than 0.
 
const char * WriteXMLErrorFile2 ()
 Writes an error file where the minimum usable diameter is less than 0.
 
const char * WriteXMLErrorFile3 ()
 Writes an error file where the segment length is less than 0.
 
const char * WriteXMLErrorFile4 ()
 Writes an error file where the volume behavior is applied to seedlings.
 
void WriteCommonStuff (std::fstream &oOut)
 Writes common portions of the test parameter files (tree pop, plot, etc).
 

Detailed Description

Tests the class clVolumeCalculator.

Member Function Documentation

void clTestVolumeCalculator::NormalRun1 ( clSimManager *  p_oSimManager)
protected

Performs the first normal processing run.

WriteXMLFile1() does setup. Five trees are created of two species. Then the run is allowed to proceed and their volumes are checked.

Parameters
p_oSimManagerSim Manager object to call for runs.
void clTestVolumeCalculator::NormalRun2 ( clSimManager *  p_oSimManager)
protected

Performs the second normal processing run.

WriteXMLFile2() does setup. Two trees are created of two species. Then the run is allowed to proceed and their volumes are checked.

Parameters
p_oSimManagerSim Manager object to call for runs.
void clTestVolumeCalculator::NormalRun3 ( clSimManager *  p_oSimManager)
protected

Performs the third normal processing run.

WriteXMLFile3() does setup. One tree is created. Then the run is allowed to proceed and its volume is checked.

Parameters
p_oSimManagerSim Manager object to call for runs.
void clTestVolumeCalculator::NormalRun4 ( clSimManager *  p_oSimManager)
protected

Performs the fourth normal processing run.

WriteXMLFile4() does setup. Four trees are created of two species. Then the run is allowed to proceed and their volumes are checked.

Parameters
p_oSimManagerSim Manager object to call for runs.
void clTestVolumeCalculator::NormalRun5 ( clSimManager *  p_oSimManager)
protected

Performs the fifth normal processing run.

WriteXMLFile5() does setup. Two trees are created of two species. Then the run is allowed to proceed and their volumes are checked.

Parameters
p_oSimManagerSim Manager object to call for runs.
void clTestVolumeCalculator::TestErrorProcessing ( clSimManager *  p_oSimManager)
protected

Tests error processing.

This uses WriteXMLErrorFile1(), WriteXMLErrorFile2(), WriteXMLErrorFile3(), and WriteXMLErrorFile4() to introduce errors and makes sure that they are caught.

void clTestVolumeCalculator::TestNormalProcessing ( clSimManager *  p_oSimManager)
protected

Tests normal processing.

It does this by calling NormalRun1(), NormalRun2(), NormalRun3(), NormalRun4(), and NormalRun5().

Parameters
p_oSimManagerSim Manager object to call for runs.
void clTestVolumeCalculator::TestVolumeCalculator ( )

Performs all the tests from one function.

void clTestVolumeCalculator::WriteCommonStuff ( std::fstream &  oOut)
protected

Writes common portions of the test parameter files (tree pop, plot, etc).

Parameters
oOutFile stream to write to.
const char* clTestVolumeCalculator::WriteXMLErrorFile1 ( )
protected

Writes an error file where the stump height is less than 0.

const char* clTestVolumeCalculator::WriteXMLErrorFile2 ( )
protected

Writes an error file where the minimum usable diameter is less than 0.

const char* clTestVolumeCalculator::WriteXMLErrorFile3 ( )
protected

Writes an error file where the segment length is less than 0.

const char* clTestVolumeCalculator::WriteXMLErrorFile4 ( )
protected

Writes an error file where the volume behavior is applied to seedlings.

const char* clTestVolumeCalculator::WriteXMLFile1 ( )
protected

Writes the parameter file for NormalRun1().

Returns
Filename written.
const char* clTestVolumeCalculator::WriteXMLFile2 ( )
protected

Writes the parameter file for NormalRun2().

Returns
Filename written.
const char* clTestVolumeCalculator::WriteXMLFile3 ( )
protected

Writes the parameter file for NormalRun3().

Returns
Filename written.
const char* clTestVolumeCalculator::WriteXMLFile4 ( )
protected

Writes the parameter file for NormalRun4().

Returns
Filename written.
const char* clTestVolumeCalculator::WriteXMLFile5 ( )
protected

Writes the parameter file for NormalRun5().

Returns
Filename written.

The documentation for this class was generated from the following file: