Regression Tests
[Fundamental Data Types]

Collaboration diagram for Regression Tests:


Detailed Description

Regression tests for the types package.

Functions

 BOOST_AUTO_TEST_CASE (compute_index_test)
 As a note when using valgrind mem-check, there are many instances of an "Conditional jump or move depends on uninitialised value(s)" warning that are issued for the deriv_1d_test and datagrid_fast_acc_test that have been determined to not effect the overall performance or functionality of data_grid::pchip and may be ignored.
 BOOST_AUTO_TEST_CASE (linear_1d_test)
 Interpolate 1-D linear field using a scalar.
 BOOST_AUTO_TEST_CASE (cubic_1d_test)
 Interpolate 1-D cubic field using a scalar.
 BOOST_AUTO_TEST_CASE (deriv_1d_test)
 Interpolate 1-D cubic field using a scalar.
 BOOST_AUTO_TEST_CASE (interp_speed_test)
 Interpolate 2-D cubic field using a cubic generating function and compare the speed required to interpolate 1e6 points using the fast_2d and data_grid methods.
 BOOST_AUTO_TEST_CASE (fast_accuracy_test)
 Interpolate 2-D cubic field using a cubic generating function and compare the interpolated results and their derivatives for both the fast_2d and data_grid methods to the analytic values.
 BOOST_AUTO_TEST_CASE (grid_2d_test)
 Test for issue #114 - data_grid linear interpolation produces unpredictable results in Win64 release builds.



 BOOST_AUTO_TEST_CASE (earth_radius_test)
 Compare the earth's radius at specific latitudes to known values.
 BOOST_AUTO_TEST_CASE (dot_test)
 Compute the dot product between set of vectors at different latitudes and a vector pointing due north.
 BOOST_AUTO_TEST_CASE (dot1_test)
 Compute the dot product between a vector at different latitudes and a vector pointing due north.
 BOOST_AUTO_TEST_CASE (distance_test)
 Compute the straight line distance between a wposition vector at different latitudes and the point 40N 45E.
 BOOST_AUTO_TEST_CASE (distance1_test)
 Compute the straight line distance between a series of wposition1 vectors at different latitudes and the point 40N 45E.
 BOOST_AUTO_TEST_CASE (gc_range_test)
 Compute the great circle range and bearing between JFK and LAX airports.



 BOOST_AUTO_TEST_CASE (sequence_linear_test1)
 Basic tests for a linearly spaced sequence of numbers.
 BOOST_AUTO_TEST_CASE (sequence_linear_test2)
 Alternate tests for a linearly spaced sequence of numbers.
 BOOST_AUTO_TEST_CASE (sequence_log_test)
 Basic tests for a logarithmically spaced sequence of numbers.
 BOOST_AUTO_TEST_CASE (sequence_data_test1)
 Basic test for a sequence defined by an unevenly spaced vector of points.
 BOOST_AUTO_TEST_CASE (sequence_data_test2)
 Alternate test for a sequence defined by an unevenly spaced vector of points.
 BOOST_AUTO_TEST_CASE (sequence_data_test3)
 Test for a sequence defined by a single point.
 BOOST_AUTO_TEST_CASE (sequence_rayfan_test)
 Basic tests for a gaussian spaced sequence of angles.
 BOOST_AUTO_TEST_CASE (sequence_foreach_test)
 Tests the functionality of BOOST_FOREACH with all sequence classes.
 BOOST_AUTO_TEST_CASE (seq_ublas_test)
 Tests the uBLas capabilities of seq_vectors.

Function Documentation

BOOST_AUTO_TEST_CASE ( seq_ublas_test   ) 

Tests the uBLas capabilities of seq_vectors.

BOOST_AUTO_TEST_CASE ( sequence_foreach_test   ) 

Tests the functionality of BOOST_FOREACH with all sequence classes.

Because of the inheritance chain of seq_vectors, boost was unable to deduce the type of iterator that was appropriate for the seq_vector classes provided. Creating specialized template typedefs for each subclass of seq_vector resolves this issue.

BOOST_AUTO_TEST_CASE ( sequence_rayfan_test   ) 

Basic tests for a gaussian spaced sequence of angles.

  • test (min,max,number) form of constructor (7 beams)
  • test sequence use as a uBLAS vector
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent, except for the increment test which is only required to be within 1e-4 percent.

BOOST_AUTO_TEST_CASE ( sequence_data_test3   ) 

Test for a sequence defined by a single point.

  • test data set size of one
  • test simple accessors: use operator[] form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments, note problem when searching exactly on element
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent, except for the increment test which is only required to be within 1e-4 percent.

BOOST_AUTO_TEST_CASE ( sequence_data_test2   ) 

Alternate test for a sequence defined by an unevenly spaced vector of points.

  • test decreasing sequence form of constructor
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator[] form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments, note problem when searching exactly on element
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent, except for the increment test which is only required to be within 1e-4 percent.

BOOST_AUTO_TEST_CASE ( sequence_data_test1   ) 

Basic test for a sequence defined by an unevenly spaced vector of points.

  • test data input form of constructor
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator[] form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments, note problem when searching exactly on element
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent, except for the increment test which is only required to be within 1e-4 percent.

BOOST_AUTO_TEST_CASE ( sequence_log_test   ) 

Basic tests for a logarithmically spaced sequence of numbers.

  • test (min,inc,number) form of constructor (third octave bands)
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator[] form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments, note problem when searching exactly on element
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent, except for the increment test which is only required to be within 1E-4 percent.

BOOST_AUTO_TEST_CASE ( sequence_linear_test2   ) 

Alternate tests for a linearly spaced sequence of numbers.

  • test (min,inc,number) form of constructor
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator[] form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( gc_range_test   ) 

Compute the great circle range and bearing between JFK and LAX airports.

Based on the "Worked Examples" in Aviation Formulary. Requires an earth radius based on the definition where 1 nmi = 1 min latitude = 1852.0 meters. Generate errors if values differ from Williams' answers, in radians, by more that 1e-4%

The process is then reversed to predict the location of JFK using this range and bearing from LAX. Those answers are required to be within 1e-10% of the true location for JFK.

References:
E. Williams, "Aviation Formulary V1.43", http://williams.best.vwh.net/avform.htm , July 2010.
BOOST_AUTO_TEST_CASE ( distance1_test   ) 

Compute the straight line distance between a series of wposition1 vectors at different latitudes and the point 40N 45E.

The results are compared to the analytic solution

          distance^2 = 2 R^2 ( 1-cos(40-latitude) )
 

Generate errors if values differ by more that 1E-6 meters. The one expection to this accuracy is the case where distance is almost zero. In that case, the calculation accuracy is limited to 0.02 meters.

BOOST_AUTO_TEST_CASE ( distance_test   ) 

Compute the straight line distance between a wposition vector at different latitudes and the point 40N 45E.

The results are compared to the analytic solution

          distance^2 = 2 R^2 ( 1-cos(40-latitude) )
 

Generate errors if values differ by more that 1E-6 meters. The one expection to this accuracy is the case where distance is almost zero. In that case, the calculation accuracy is limited to 0.02 meters.

BOOST_AUTO_TEST_CASE ( dot1_test   ) 

Compute the dot product between a vector at different latitudes and a vector pointing due north.

If correct, the dots products should correspond to the angles defined by the latitudes of the original points.

Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( dot_test   ) 

Compute the dot product between set of vectors at different latitudes and a vector pointing due north.

If correct, the dots products should correspond to the angles defined by the latitudes of the original points.

Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( sequence_linear_test1   ) 

Basic tests for a linearly spaced sequence of numbers.

  • test (min,inc,max) form of constructor
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator() form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments
  • test conversion into a uBLAS vector
  • test iterator looping
  • separate dereferencing and pre-increment operations

Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( earth_radius_test   ) 

Compare the earth's radius at specific latitudes to known values.

Generate errors if values differ by more that 1E-6 percent.

References:
WGS 84 IMPLEMENTATION MANUAL, Version 2.4, 1998. See http://www.dqts.net/wgs84.htm for more information.
BOOST_AUTO_TEST_CASE ( grid_2d_test   ) 

Test for issue #114 - data_grid linear interpolation produces unpredictable results in Win64 release builds.

When running usml_test using a Win x64 release build the reflection_test/reflect_grid_test fails. We traced this down to an error in using the linear() interpolation method with a 2-D data_grid. If we add debug cout statements after the const DATA_TYPE a = interp() and const DATA_TYPE b = interp() we can see that a changes value while b is being computed. Even though linear is used recursively, a is a local variable and this should not happen. It only seems to happen for linear 2-D interpolation of ETOPO1 bathymetry, and only using the Release x64 model of Visual C+++ 2012 in Visual Studio 2013. Perhaps it has something to do with optimizing a recursive template function.

BOOST_AUTO_TEST_CASE ( fast_accuracy_test   ) 

Interpolate 2-D cubic field using a cubic generating function and compare the interpolated results and their derivatives for both the fast_2d and data_grid methods to the analytic values.

An error is produced if the values produced by fast_grids are greater than a 3% difference from the data_grid or true values.

BOOST_AUTO_TEST_CASE ( interp_speed_test   ) 

Interpolate 2-D cubic field using a cubic generating function and compare the speed required to interpolate 1e6 points using the fast_2d and data_grid methods.

BOOST_AUTO_TEST_CASE ( deriv_1d_test   ) 

Interpolate 1-D cubic field using a scalar.

Test the accuracy of the derivatives Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( cubic_1d_test   ) 

Interpolate 1-D cubic field using a scalar.

Exercise all of the 1-D interpolation types. Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( linear_1d_test   ) 

Interpolate 1-D linear field using a scalar.

Exercise all of the 1-D interpolation types. Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( compute_index_test   ) 

As a note when using valgrind mem-check, there are many instances of an "Conditional jump or move depends on uninitialised value(s)" warning that are issued for the deriv_1d_test and datagrid_fast_acc_test that have been determined to not effect the overall performance or functionality of data_grid::pchip and may be ignored.

Test the ability of data_grid_compute_offset() to retrieve data from a 3-D data matrix in column major order. Generate errors if values differ by more that 1E-6 percent.


Generated on 4 May 2015 for USML by  doxygen 1.6.1