00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00025 #ifndef TEST_UTIL_H_
00026 #define TEST_UTIL_H_
00027
00028 namespace makefile { namespace tester {
00029 int exec_make(std::stringbuf& makeoutbuf, std::stringbuf& makeerrbuf);
00030
00034 class Test
00035 {
00037 std::stringbuf makeoutbuf, makeerrbuf;
00039 const char* name;
00041 const char* goodout;
00042 bool result;
00043 public:
00045 Test(const char* name_, const char* goodout_)
00046 :name(name_), goodout(goodout_), result(false) {}
00048 virtual ~Test() {}
00050 virtual bool run();
00052 virtual bool precond()
00053 {
00054 return true;
00055 }
00057 virtual bool eval()
00058 {
00059 result = precond() && (goodout == makeoutbuf.str());
00060 return result;
00061 }
00062
00063 };
00064 }}
00065 #endif