//======================================================================== // // Name: CutID_t.cpp // // Purpose: Component test for CutID. // // Created: 3-Jul-2000 H. Greenlee // //======================================================================== #include #include #include "CutID.hpp" using namespace std; using namespace trf; int main() { cout << "-------- Testing component CutID. --------" << 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; } // Tests. CutID id1; assert(id1.id() == -1); assert(!id1.is_valid()); CutID id2(0); assert(id2.id() == 0); assert(id2.is_valid()); // Done (OK). cout << "------------- All tests passed. -------------" << endl; return 0; }