00001 #ifndef _TESTBED_HPP_
00002 #define _TESTBED_HPP_
00003
00004 #include <iostream>
00005 #include <set>
00006
00007 #include "TestItem.hpp"
00008
00009 template <class T>
00010 struct PLess : std::binary_function<T, T, bool> {
00011 bool operator()(const T& x, const T& y) const { return *x < *y; }
00012 };
00013
00014 class TestBed : public std::set < TestItem * , PLess< TestItem * > > {
00015 public:
00016 TestBed(){ std::cout<<"Test begin"<<std::endl;}
00017 ~TestBed(){ std::cout<<"Test end\nresults:\n"<<*this<<std::endl;}
00018 friend std::ostream &operator<<(std::ostream &os, const TestBed &bed);
00019 };
00020 #endif