// FullFitter_t.cpp #include "FullFitter.h" #include "FullFitterTest.h" #include "trfbase/SurfTest.h" #include "trfbase/ETrack.h" #include "HTrack.h" #include #include #include using std::cout; using std::cerr; using std::endl; using std::string; using namespace trf; //********************************************************************** int main( ) { string component = "FullFitter"; string ok_prefix = component + " (I): "; string error_prefix = component + " test (E): "; cout << ok_prefix << "-------- Testing component " + component + ". --------" << endl; // Make sure assert is enabled. bool assert_flag = false; assert ( ( assert_flag = true, assert_flag ) ); if ( ! assert_flag ) { cerr << "Assert is disabled" << endl; return 1; } //******************************************************************** cout << trf_format; cout << ok_prefix << "Define track." << endl; SurfTest srf(10); ETrack tre( SurfacePtr(srf.new_pure_surface()) ); HTrack trh(tre); //******************************************************************** cout << ok_prefix << "Test constructor." << endl; int ival = 123; FullFitterTest fit(ival); cout << fit << endl; assert( fit.fit(trh) == ival ); //******************************************************************** cout << ok_prefix << "------------- All tests passed. -------------" << endl; return 0; //******************************************************************** }