00001 #ifndef CDBBDBTESTS_TEST_ITERATOR_HH 00002 #define CDBBDBTESTS_TEST_ITERATOR_HH 00003 00004 // File and Version Information: 00005 // $Id: CdbBdbTestIterator.hh,v 1.3 2004/08/06 05:54:34 bartoldu Exp $ 00006 00007 #include "CdbBase/CdbCommon.hh" 00008 00009 /// The utility class for testing iteratots 00010 /** 00011 * The only template parameter of this class is T - the type of 00012 * an iterator to be tested. 00013 * 00014 * This test also assumes that the passed type corresponds to concrete 00015 * iterator having a default constructor. Therefore the test will also 00016 * instantiate the iterator. 00017 * 00018 * Note the way the returned value is tested: we do not assume the presence 00019 * of the default constructor for the value. This method can also return 00020 * a reference, smart pointer onto an interface or a regular pointer. 00021 * 00022 * See the implementation of this class for more details. 00023 * Some tests may be implemented using full template specialization. 00024 */ 00025 template < class T > 00026 class CdbBdbTestIterator { 00027 00028 public: 00029 00030 /// Do the test 00031 /** 00032 * This method won't return any status. All problems will be detected 00033 * either during its compilation or they will be reported through 00034 * the "std::cout" or "assert" at the execution time. 00035 */ 00036 static void exerciseIterator( ); 00037 }; 00038 00039 #ifdef BABAR_COMP_INST 00040 #include "CdbBdbTests/CdbBdbTestIterator.cc" 00041 #endif // BABAR_COMP_INST 00042 00043 #endif // CDBBDBTESTS_TEST_ITERATOR_HH
1.3-rc3