Main Page   Namespace List   Class Hierarchy   Compound List   File List   Header Files   Sources   Namespace Members   Compound Members   File Members  

test Namespace Reference

Contains classes, functions and constants useful for automated testing. More...


Compounds

class  sqr
class  fabs_func
class  cos_func
class  mag2
class  one
class  vecone
class  minussqr

Functions

void start ( const char *file )
Indicate the start of the sequence of tests. More...

void start_section_ ( const char *file, const unsigned line, const char *name )
void report ( const char *file, const unsigned line, const char *test, const bool result )
int end ( const char *file )
Indicate the end of the sequence of tests. More...

bool approx_equal ( const double x, const double y )
bool approx_equal ( const vector2 &a, const vector2 &b )
void test_minimise (void)
void test_curve (void)
void test_delaunay (void)
void test_angle_constraint (void)
void test_along_constraint (void)
void test_bearing_constraint (void)
void test_constraint (void)
void test_distance_constraint (void)
void test_through_constraint (void)
void test_vector_constraint (void)
void test_total_energy_function (void)
void test_angle ( const int from_deg, const int angle_deg )
void test_nearest_point ( const curve &c, const vector2 &p, const double t_expect )
void test_cicumcircle ( const vector2 &circumcentre, const double circumradius, double a0, double a1, double a2 )
template<class T> bool contains ( const vector< T > &v, const T &x )
void test_inverse_parabolic_extrapolation ( const func::single_dimension &f, const char *f_name, const double x1, const double x2, const double x3 )
void test_bracket ( const func::single_dimension &f, const char *f_name, const bool should_converge, const double xi1, const double xi2 )
void test_narrow_bracket ( double x1, double x2, double x3, double f1, double f2, double f3, const double x_new, const double f_new, const unsigned i_new )
void test_line ( const func::multi_dimensional_with_derivatives &f, const char *f_name, const double p0, const double p1, const double s0, const double s1, const bool should_converge, const double r0, const double r1 )
void test_Brent ( const func::single_dimension &f, const char *f_name, const bool should_converge, const double x_min, double x1, double x2, double x3 )
void test_Fletcher_Reeves_Polak_Ribere ( const func::multi_dimensional_with_derivatives &f, const char *f_name, const bool should_converge, const double p0, const double p1, const double pmin0, const double pmin1 )
vector2 random_position ( const double left, const double right, const double top, const double bottom )
void test_move_points ( const total_energy_function &f, const vector<double> &x, const char *title )
void test_minimise ( const total_energy_function &f, vector<double> &x, const vector<double> &x0, const char *title )
void test_solution ( const char *title, const vector< vector2 * > &points, const set< vector2 * > &fixed_points, const vector< constraint * > &constraints, const vector< vector2 > &expected_solution )

Variables

const double small
const double tol


Detailed Description

Contains classes, functions and constants useful for automated testing.


Function Documentation

void test::start (const char * file)

Indicate the start of the sequence of tests.

This must be the first function of the test.h functions that is called. This function initialises data used by the other test functions and writes a header to standard output.

Parameters:
file   the name of this set of tests; usually the name of the file holding the source-code of the caller

Preconditions:
 assert( file );

Definition at line 45 of file test_modules.cpp.

void test::start_section_ (const char * file, const unsigned line, const char * name)

For internal use only.

Definition at line 56 of file test_modules.cpp.

void test::report (const char * file, const unsigned line, const char * test, const bool result)

For internal use only.

Definition at line 68 of file test_modules.cpp.

int test::end (const char * file)

Indicate the end of the sequence of tests.

This must be the last function of the test.h functions that is called, and it must be called before completion of a test program. This writes a sumary report to standard output.

Parameters:
file   the name of this set of tests; usually the name of the file holding the source-code of the caller
Returns:
the number of test failures; if this is non-zero, the test driver program should return a non-zero value to indicate that some tests failed

Preconditions:
 assert( file );

Definition at line 88 of file test_modules.cpp.

bool test::approx_equal (const double x, const double y)

Definition at line 105 of file test_modules.cpp.

bool test::approx_equal (const vector2 & a, const vector2 & b)

Definition at line 114 of file test_modules.cpp.

void test::test_minimise (void)

Definition at line 478 of file test_minimise.cpp.

void test::test_curve (void)

Definition at line 60 of file test_curve.cpp.

void test::test_delaunay (void)

Definition at line 96 of file test_delaunay.cpp.

void test::test_angle_constraint (void)

Definition at line 99 of file test_angle_constraint.cpp.

void test_along_constraint (void)

void test::test_bearing_constraint (void)

Definition at line 37 of file test_bearing_constraint.cpp.

void test::test_constraint (void)

Definition at line 40 of file test_constraint.cpp.

void test::test_distance_constraint (void)

Definition at line 39 of file test_distance_constraint.cpp.

void test::test_through_constraint (void)

Definition at line 38 of file test_through_constraint.cpp.

void test::test_vector_constraint (void)

Definition at line 38 of file test_vector_constraint.cpp.

void test::test_total_energy_function (void)

Definition at line 183 of file test_total_energy_function.cpp.

void test::test_angle (const int from_deg, const int angle_deg) [static]

Definition at line 38 of file test_angle_constraint.cpp.

void test::test_nearest_point (const curve & c, const vector2 & p, const double t_expect) [static]

Definition at line 39 of file test_curve.cpp.

void test::test_cicumcircle (const vector2 & circumcentre, const double circumradius, double a0, double a1, double a2) [static]

Definition at line 43 of file test_delaunay.cpp.

template<class T>
bool test::contains (const vector<T>& v, const T & x) [static]

Definition at line 82 of file test_delaunay.cpp.

void test::test_inverse_parabolic_extrapolation (const func::single_dimension & f, const char * f_name, const double x1, const double x2, const double x3) [static]

Definition at line 215 of file test_minimise.cpp.

void test::test_bracket (const func::single_dimension & f, const char * f_name, const bool should_converge, const double xi1, const double xi2) [static]

Definition at line 243 of file test_minimise.cpp.

void test::test_narrow_bracket (double x1, double x2, double x3, double f1, double f2, double f3, const double x_new, const double f_new, const unsigned i_new) [static]

Definition at line 290 of file test_minimise.cpp.

void test::test_line (const func::multi_dimensional_with_derivatives & f, const char * f_name, const double p0, const double p1, const double s0, const double s1, const bool should_converge, const double r0, const double r1) [static]

Definition at line 333 of file test_minimise.cpp.

void test::test_Brent (const func::single_dimension & f, const char * f_name, const bool should_converge, const double x_min, double x1, double x2, double x3) [static]

Definition at line 379 of file test_minimise.cpp.

void test::test_Fletcher_Reeves_Polak_Ribere (const func::multi_dimensional_with_derivatives & f, const char * f_name, const bool should_converge, const double p0, const double p1, const double pmin0, const double pmin1) [static]

Definition at line 430 of file test_minimise.cpp.

vector2 test::random_position (const double left, const double right, const double top, const double bottom) [static]

Definition at line 54 of file test_total_energy_function.cpp.

void test::test_move_points (const total_energy_function & f, const vector<double>& x, const char * title) [static]

Definition at line 69 of file test_total_energy_function.cpp.

void test::test_minimise (const total_energy_function & f, vector<double>& x, const vector<double>& x0, const char * title) [static]

Definition at line 87 of file test_total_energy_function.cpp.

void test::test_solution (const char * title, const vector<vector2 *>& points, const set<vector2 *>& fixed_points, const vector<constraint *>& constraints, const vector<vector2>& expected_solution) [static]

Definition at line 125 of file test_total_energy_function.cpp.


Variable Documentation

const double test::small

Definition at line 107 of file test.h.

const double test::tol

Definition at line 108 of file test.h.


Generated at Sun Jul 14 20:38:23 2002 for Mapper by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999