// Checker_t.cpp #include "Checker.h" #include "CheckerTest.h" #include #include #include #include "trfutil/trfstream.h" #include "trfbase/SurfTest.h" #include "trfbase/ETrack.h" #include "trffit/MTrack.h" using std::cout; using std::cerr; using std::endl; using std::string; using namespace trf; //********************************************************************** int main( ) { string component = "Checker"; 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 << "Create checker." << endl; CheckerTest chk; cout << chk << endl; //******************************************************************** cout << ok_prefix << "Test status." << endl; ETrack tre( SurfacePtr(new SurfTest(1)) ); MTrack trm(tre); const Checker& rchk = chk; assert( rchk.status(trm) ); assert( rchk.status_with_record(trm,0) ); //******************************************************************** cout << ok_prefix << "------------- All tests passed. -------------" << endl; return 0; //******************************************************************** }