MCPcopy Create free account
hub / github.com/ImageEngine/cortex / test1

Method test1

test/IECore/LookupTest.cpp:68–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 1

LinearFunctorClass · 0.85

Tested by

no test coverage detected