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

Tests the clTreePopulation class. More...

#include <TestTreePopulation2.h>

Inheritance diagram for clTestTreePopulation2:

Public Member Functions

void TestTreePopulation ()
 Combines all the tests for testing the tree population.
 

Protected Member Functions

void TestTreeMapReading (clSimManager *p_oSimManager)
 Makes sure that tree maps are read correctly.
 
void TestTextTreeMapReading2 (clSimManager *p_oSimManager)
 Makes sure that tree maps are read correctly.
 
void TestTextTreeMapReading1 (clSimManager *p_oSimManager)
 This is a clone of TestTreeMapReading except it uses a text tree map.
 
void TestInitialDensities (clSimManager *p_oSimManager)
 Makes sure that initial densities are set up correctly.
 
void TreeMapBugFixTesting (clSimManager *p_oSimManager)
 This checks hash table organization bugs I've run into to make sure they're fixed.
 
void TestErrorProcessing (clSimManager *p_oSimManager)
 Tests error processing.
 
const char * WriteXMLFile1 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile2 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile3 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile4 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile5 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile6 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile7 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile8 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile9 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile10 ()
 Writes a parameter file for testing.
 
const char * WriteXMLFile11 ()
 Writes a parameter file for testing.
 
const char * WriteXMLErrorFile1 ()
 Writes a parameter file for error testing.
 
const char * WriteXMLErrorFile2 ()
 Writes a parameter file for error testing.
 
const char * WriteXMLErrorFile3 ()
 Writes a parameter file for error testing.
 
const char * WriteXMLErrorFile4 ()
 Writes a parameter file for error testing.
 
const char * WriteXMLErrorFile5 ()
 Writes a parameter file for error testing.
 
const char * WriteXMLErrorFile6 ()
 Writes a parameter file for error testing.
 
const char * WriteXMLErrorFile7 ()
 Writes a parameter file for error testing.
 
const char * WriteXMLErrorFile8 ()
 Writes a parameter file for error testing.
 
const char * WriteTextTreeMap ()
 Writes a tab-delimited text tree map.
 
const char * WriteTextTreeMap2 ()
 Writes a tab-delimited text tree map.
 
void WriteCommonPlotStuff (std::fstream &oOut)
 Writes a common portion of the test parameter files.
 
void WriteCommonFileStuff (std::fstream &oOut)
 Writes a common portion of the test parameter files.
 

Detailed Description

Tests the clTreePopulation class.

This is because TestTreePopulation got too big.

Member Function Documentation

void clTestTreePopulation2::TestErrorProcessing ( clSimManager *  p_oSimManager)
protected

Tests error processing.

Bad parameter files are fed in to see if the errors are caught.

void clTestTreePopulation2::TestInitialDensities ( clSimManager *  p_oSimManager)
protected

Makes sure that initial densities are set up correctly.

There are 7 runs. They are as follows:

  • Run 1: No trees in the initial densities. (No trees are created.)
  • Run 2: No seedlings at all.
  • Run 3: Seedlings in all three size classes, all species, plus DBH class seedlings.
  • Run 4: Seedlings in only the first size class, some species.
  • Run 5: Seedlings in only the second size class, some species.
  • Run 6: Seedlings in only the third size class, some species.
  • Run 7: Only seedlings in the DBH size class.

There is a parameter file for each run, WriteXMLFile2 through WriteXMLFile8.

void clTestTreePopulation2::TestTextTreeMapReading1 ( clSimManager *  p_oSimManager)
protected

This is a clone of TestTreeMapReading except it uses a text tree map.

void clTestTreePopulation2::TestTextTreeMapReading2 ( clSimManager *  p_oSimManager)
protected

Makes sure that tree maps are read correctly.

This includes trees of every tree type, with each type defined by either diameter or height. WriteXMLFile11() writes the tree map parameter file.

void clTestTreePopulation2::TestTreeMapReading ( clSimManager *  p_oSimManager)
protected

Makes sure that tree maps are read correctly.

This includes trees of every tree type, with each type defined by either diameter or height. WriteXMLFile1() writes the tree map parameter file.

void clTestTreePopulation2::TestTreePopulation ( )

Combines all the tests for testing the tree population.

void clTestTreePopulation2::TreeMapBugFixTesting ( clSimManager *  p_oSimManager)
protected

This checks hash table organization bugs I've run into to make sure they're fixed.

WriteXMLFile9() does setup with a particular tree map.

void clTestTreePopulation2::WriteCommonFileStuff ( std::fstream &  oOut)
protected

Writes a common portion of the test parameter files.

This writes all tree parameters and the rest of the plot.

Parameters
oOutFile stream to write to.
void clTestTreePopulation2::WriteCommonPlotStuff ( std::fstream &  oOut)
protected

Writes a common portion of the test parameter files.

This writes from the beginning of the file to "&lt;/plot&gt;".

Parameters
oOutFile stream to write to.
const char* clTestTreePopulation2::WriteTextTreeMap ( )
protected

Writes a tab-delimited text tree map.

Returns
Filename written.
const char* clTestTreePopulation2::WriteTextTreeMap2 ( )
protected

Writes a tab-delimited text tree map.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLErrorFile1 ( )
protected

Writes a parameter file for error testing.

This contains an initial density value that is negative.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLErrorFile2 ( )
protected

Writes a parameter file for error testing.

This contains an initial density value that cannot be converted into a number.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLErrorFile3 ( )
protected

Writes a parameter file for error testing.

This contains initial densities with no size classes.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLErrorFile4 ( )
protected

Writes a parameter file for error testing.

This contains an initial density value for an unrecognized species.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLErrorFile5 ( )
protected

Writes a parameter file for error testing.

This contains an initial density value with an unrecognized size class.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLErrorFile6 ( )
protected

Writes a parameter file for error testing.

This contains an initial density class that cannot be converted into a number.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLErrorFile7 ( )
protected

Writes a parameter file for error testing.

This contains a seedling height class taller than 135.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLErrorFile8 ( )
protected

Writes a parameter file for error testing.

An upper bound for the first seedling height class is above the value for the upper bound of the second seedling height class for that species.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLFile1 ( )
protected

Writes a parameter file for testing.

This contains a tree map to test tree map reading.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLFile10 ( )
protected

Writes a parameter file for testing.

This contains a filename for a text- based tree map.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLFile11 ( )
protected

Writes a parameter file for testing.

This contains a filename for a text- based tree map.

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

Writes a parameter file for testing.

This contains no initial densities.

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

Writes a parameter file for testing.

This contains no seedlings in any form.

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

Writes a parameter file for testing.

This contains all possible ways of specifying seedlings.

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

Writes a parameter file for testing.

This contains only seedlings in the first height class.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLFile6 ( )
protected

Writes a parameter file for testing.

This contains only seedlings in the second height class.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLFile7 ( )
protected

Writes a parameter file for testing.

This contains only seedlings in the third height class.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLFile8 ( )
protected

Writes a parameter file for testing.

This contains only seedlings in the DBH class.

Returns
Filename written.
const char* clTestTreePopulation2::WriteXMLFile9 ( )
protected

Writes a parameter file for testing.

This contains a tree map to test tree map reading to verify bug fixes.

Returns
Filename written.

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