| 66 | { |
| 67 | |
| 68 | void test1() |
| 69 | { |
| 70 | Lookupff l( LinearFunctor(), -10.0f, 10.0f, 20 ); |
| 71 | |
| 72 | const unsigned testPoints = 250; |
| 73 | for( unsigned i=0; i<testPoints; i++ ) |
| 74 | { |
| 75 | float x = (float)i/(float)( testPoints-1 ); |
| 76 | BOOST_CHECK( fabs( x - l( x ) ) < 0.00001f ); |
| 77 | } |
| 78 | |
| 79 | BOOST_CHECK( fabs( -10.0f - l( -11.0f ) ) < 0.00001f ); |
| 80 | BOOST_CHECK( fabs( 10.0f - l( 11.0f ) ) < 0.00001f ); |
| 81 | } |
| 82 | |
| 83 | void test2() |
| 84 | { |
nothing calls this directly
no test coverage detected