TestSuite.h
Go to the documentation of this file.
/*
* steghide 0.5.1 - a steganography program
* Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef SH_TESTSUITE_H
#define SH_TESTSUITE_H
#include <string>
#include <vector>
#include <iostream>
#include "Test.h"
#include "UnitTest.h"
class TestSuite : public Test {
public:
enum TESTRESULT { NOTINSTALLED, // when something that is needed for the test is not installed on the current system
KNOWNEXCEPTION,
UNKNOWNEXCEPTION } ;
TestSuite (void) ;
void addUnitTest (UnitTest* ut) ;
void run (void) ;
bool getResult (void)
{ return SuiteOk ; } ;
// used during testing
void startUnit (std::string n) ;
void endUnit (std::string n) ;
void startCategory (std::string n) ;
void endCategory (std::string n) ;
void addTestResult (bool r) ;
void addTestResult (TESTRESULT r) ;
private:
std::vector<UnitTest*> UnitTests ;
std::string runningUnit ;
std::string runningCategory ;
bool runningCategoryOk ;
bool SuiteOk ;
unsigned short TestNumber ;
std::ostream* OutStream ;
} ;
#endif // ndef SH_TESTSUITE_H
Test.h
UnitTest.h
TestSuite::addUnitTest
void addUnitTest(UnitTest *ut)
Definition TestSuite.cc:34
TestSuite::getResult
bool getResult(void)
Definition TestSuite.h:46
TestSuite::addTestResult
void addTestResult(bool r)
Definition TestSuite.cc:104
TestSuite::run
void run(void)
Definition TestSuite.cc:39
TestSuite::TestSuite
TestSuite(void)
Definition TestSuite.cc:25
TestSuite::OutStream
std::ostream * OutStream
Definition TestSuite.h:65
TestSuite::startCategory
void startCategory(std::string n)
Definition TestSuite.cc:75
TestSuite::runningUnit
std::string runningUnit
Definition TestSuite.h:60
TestSuite::runningCategory
std::string runningCategory
Definition TestSuite.h:61
TestSuite::SuiteOk
bool SuiteOk
Definition TestSuite.h:63
TestSuite::UnitTests
std::vector< UnitTest * > UnitTests
Definition TestSuite.h:58
TestSuite::endCategory
void endCategory(std::string n)
Definition TestSuite.cc:88
TestSuite::endUnit
void endUnit(std::string n)
Definition TestSuite.cc:63
TestSuite::TestNumber
unsigned short TestNumber
Definition TestSuite.h:64
TestSuite::startUnit
void startUnit(std::string n)
Definition TestSuite.cc:52
TestSuite::TESTRESULT
TESTRESULT
Definition TestSuite.h:33
TestSuite::NOTINSTALLED
@ NOTINSTALLED
Definition TestSuite.h:33
TestSuite::UNKNOWNEXCEPTION
@ UNKNOWNEXCEPTION
Definition TestSuite.h:35
TestSuite::KNOWNEXCEPTION
@ KNOWNEXCEPTION
Definition TestSuite.h:34
TestSuite::runningCategoryOk
bool runningCategoryOk
Definition TestSuite.h:62
Test::Test
Test(void)
Definition Test.h:30
UnitTest
Definition UnitTest.h:38