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

This class tests the light filter behavior. More...

#include <TestLightFilter.h>

Inheritance diagram for clTestLightFilter:

Public Member Functions

void TestLightFiltering ()
 Tests light filtering.
 

Private Member Functions

void VerifyXMLFile1 (clTreePopulation *p_oPop)
 Creates a test suite of all the test cases in this object.
 
void SetTreeValues (clTreePopulation *p_oPop)
 Sets the initial conditions for each tree prior to running the light filter behavior.
 
const char * WriteXMLFile1 ()
 Writes a parameter file to direct testing.
 
const char * WriteXMLErrorFile1 ()
 Writes a file designed to produce an error in setup.
 

Detailed Description

This class tests the light filter behavior.

It writes out parameter files and uses them as input to perform setup; it then sets up the desired initial conditions, causes the light filter behavior to run, then tests its output.

Member Function Documentation

void clTestLightFilter::SetTreeValues ( clTreePopulation *  p_oPop)
private

Sets the initial conditions for each tree prior to running the light filter behavior.

This assumes the trees have already been created. Each tree will have its "Z" and "Light" value set according to the test script.

Parameters
p_oPopTree population.
void clTestLightFilter::TestLightFiltering ( )

Tests light filtering.

It will cause a parameter file to be written, and then passed to a clSimManager object. This object will read it. The trees will be retrieved and assigned GLIs, and then light filter is run and the data validated.

void clTestLightFilter::VerifyXMLFile1 ( clTreePopulation *  p_oPop)
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.

Returns
The test suite. Verifies the values after WriteXMLFile1 has been executed.
Parameters
p_oPopTree population.
const char* clTestLightFilter::WriteXMLErrorFile1 ( )
private

Writes a file designed to produce an error in setup.

The error is that there is not a light behavior assigned to all species/types that use light filtering.

const char* clTestLightFilter::WriteXMLFile1 ( )
private

Writes a parameter file to direct testing.

This contains all tree information and light filter information, and a behavior list that includes quadratlight (for correct registration of "lgm" tree data member) and the light filter behavior. It also has a tree map so we'll be dealing with a known list of trees.

Returns
Filename written.

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