Files
haiku-beta6/headers/tools/cppunit/TestCase.h
T

39 lines
1.0 KiB
C++
Raw Normal View History

2002-07-09 12:24:59 +00:00
#ifndef _beos_test_case_h_
#define _beos_test_case_h_
#include <BeBuild.h>
2002-07-09 12:24:59 +00:00
#include <cppunit/TestCase.h>
#include <StorageDefs.h>
2002-07-11 03:28:37 +00:00
#include <SupportDefs.h>
2002-07-09 12:24:59 +00:00
2002-07-11 03:28:37 +00:00
//! Base class for single threaded unit tests
class CPPUNIT_API BTestCase : public CppUnit::TestCase {
2002-07-09 12:24:59 +00:00
public:
BTestCase(string Name = "");
2002-07-11 03:28:37 +00:00
//! Displays the next sub test progress indicator (i.e. [0][1][2][3]...).
virtual void NextSubTest();
//! Starts a new sub test block (i.e. prints a newline :-)
virtual void NextSubTestBlock();
2002-07-17 10:50:55 +00:00
/*! \brief Prints to standard out just like printf, except shell verbosity
settings are honored.
*/
virtual void Outputf(const char *str, ...);
2002-07-11 03:28:37 +00:00
//! Saves the location of the current working directory.
2002-07-09 12:24:59 +00:00
void SaveCWD();
2002-07-11 03:28:37 +00:00
virtual void tearDown();
//! Restores the current working directory to last directory saved by a call to SaveCWD().
2002-07-09 12:24:59 +00:00
void RestoreCWD(const char *alternate = NULL);
protected:
bool fValidCWD;
2002-07-11 03:28:37 +00:00
char fCurrentWorkingDir[B_PATH_NAME_LENGTH+1];
int32 fSubTestNum;
2002-07-09 12:24:59 +00:00
};
2002-09-28 00:11:29 +00:00
#endif // _beos_test_case_h_