Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

TestSuite.h

Go to the documentation of this file.
00001 /* 00002 * steghide 0.5.1 - a steganography program 00003 * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at> 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 * 00019 */ 00020 00021 #ifndef SH_TESTSUITE_H 00022 #define SH_TESTSUITE_H 00023 00024 #include <string> 00025 #include <vector> 00026 #include <iostream> 00027 00028 #include "Test.h" 00029 #include "UnitTest.h" 00030 00031 class TestSuite : public Test { 00032 public: 00033 enum TESTRESULT { NOTINSTALLED, // when something that is needed for the test is not installed on the current system 00034 KNOWNEXCEPTION, 00035 UNKNOWNEXCEPTION } ; 00036 00037 TestSuite (void) ; 00038 00039 void addUnitTest (UnitTest* ut) ; 00040 00041 void run (void) ; 00042 00046 bool getResult (void) 00047 { return SuiteOk ; } ; 00048 00049 // used during testing 00050 void startUnit (std::string n) ; 00051 void endUnit (std::string n) ; 00052 void startCategory (std::string n) ; 00053 void endCategory (std::string n) ; 00054 void addTestResult (bool r) ; 00055 void addTestResult (TESTRESULT r) ; 00056 00057 private: 00058 std::vector<UnitTest*> UnitTests ; 00059 00060 std::string runningUnit ; 00061 std::string runningCategory ; 00062 bool runningCategoryOk ; 00063 bool SuiteOk ; 00064 unsigned short TestNumber ; 00065 std::ostream* OutStream ; 00066 } ; 00067 00068 #endif // ndef SH_TESTSUITE_H

Generated on Fri Jul 16 19:41:21 2004 for steghide by doxygen 1.3.7