TestBed.hpp
Go to the documentation of this file.
1 #ifndef _TESTBED_HPP_
2 #define _TESTBED_HPP_
3 
4 #include <iostream>
5 #include <set>
6 
7 #include "TestItem.hpp"
8 
9 template <class T>
10 struct PLess : std::binary_function<T, T, bool> {
11  bool operator()(const T& x, const T& y) const { return *x < *y; }
12 };
13 
14 class TestBed : public std::set < TestItem * , PLess< TestItem * > > {
15 public:
16  TestBed(){ std::cout<<"Test begin"<<std::endl;}
17  ~TestBed(){ std::cout<<"Test end\nresults:\n"<<*this<<std::endl;}
18  friend std::ostream &operator<<(std::ostream &os, const TestBed &bed);
19 };
20 #endif
~TestBed()
Definition: TestBed.hpp:17
bool operator()(const T &x, const T &y) const
Definition: TestBed.hpp:11
friend std::ostream & operator<<(std::ostream &os, const TestBed &bed)
TestBed()
Definition: TestBed.hpp:16