SORTIE C++ Test Documentation
Classes | Public Member Functions | Private Member Functions | List of all members
clTestGLILight Class Reference

This class tests the GLILight class. More...

#include <TestGLILight.h>

Inheritance diagram for clTestGLILight:

Classes

struct  fakeRecord
 For testing the values in tree records. More...
 

Public Member Functions

void TestGLILight ()
 Puts the tests together into one.
 

Private Member Functions

void Run1 (clSimManager *p_oSimManager)
 Tests GLI calculations.
 
void Run2 (clSimManager *p_oSimManager)
 Tests GLI calculations.
 
void Run3 (clSimManager *p_oSimManager)
 Tests GLI calculations in the southern hemisphere.
 
void TestDoSetupErrorProcessing (clSimManager *p_oSimManager)
 This tests error processing during setup.
 
const char * WriteXMLFile1 ()
 Writes a parameter file to direct testing for GLI light assignments.
 
const char * WriteXMLFile2 ()
 Writes a parameter file to direct testing for GLI light assignments.
 
const char * WriteXMLFile3 ()
 Writes a parameter file to direct testing for GLI light assignments.
 
const char * WriteXMLErrorFile1 ()
 Writes a parameter file with a deliberate error.
 

Detailed Description

This class tests the GLILight class.

Member Function Documentation

void clTestGLILight::Run1 ( clSimManager *  p_oSimManager)
private

Tests GLI calculations.

WriteXMLFile1() is used for setup. Seventeen trees are created, and the GLI calculations of six of them are tested to make sure they are right. There is only one species, for simplicity.

Parameters
p_oSimManagerObject to run a test with.
void clTestGLILight::Run2 ( clSimManager *  p_oSimManager)
private

Tests GLI calculations.

WriteXMLFile2() is used for setup. Five trees are created, and the GLI calculations of two of them are tested to make sure they are right. This tests mid-crown calculations. There is only one species, for simplicity.

Parameters
p_oSimManagerObject to run a test with.
void clTestGLILight::Run3 ( clSimManager *  p_oSimManager)
private

Tests GLI calculations in the southern hemisphere.

WriteXMLFile3() is used for setup. Seventeen trees are created, and the GLI calculations of six of them are tested to make sure they are right. There is only one species, for simplicity.

Parameters
p_oSimManagerObject to run a test with.
void clTestGLILight::TestDoSetupErrorProcessing ( clSimManager *  p_oSimManager)
private

This tests error processing during setup.

The only error currently trapped for is that the number of years per timestep is less than 1.

Parameters
p_oSimManagerObject to run a test with.
void clTestGLILight::TestGLILight ( )

Puts the tests together into one.

const char* clTestGLILight::WriteXMLErrorFile1 ( )
private

Writes a parameter file with a deliberate error.

The number of years per timestep is less than 1, which should cause light to throw an error.

Returns
Filename written.
const char* clTestGLILight::WriteXMLFile1 ( )
private

Writes a parameter file to direct testing for GLI light assignments.

Returns
Filename written.
const char* clTestGLILight::WriteXMLFile2 ( )
private

Writes a parameter file to direct testing for GLI light assignments.

Returns
Filename written.
const char* clTestGLILight::WriteXMLFile3 ( )
private

Writes a parameter file to direct testing for GLI light assignments.

Returns
Filename written.

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