haiku/src/tests/ExampleTest.h
Tyler Dauwalder bc85a65ae3 Initial checking of unified unit testing app and example test.
+ Currently, only statically linked tests are supported.
+ None of the existing tests have been integrated into it yet; that will come after I add dynamic linking.
+ The example test has multithreaded and singlethreaded examples
+ The name of the unit testing app is open for negotiation if UnitTester is unacceptable for some reason. :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@78 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-11 03:34:41 +00:00

23 lines
430 B
C++

#ifndef _example_test_h_
#define _example_test_h_
#include <ThreadedTestCase.h>
#include <Locker.h>
class ExampleTest : public BThreadedTestCase {
public:
ExampleTest(std::string name = "");
virtual ~ExampleTest() { delete fLocker; }
static Test* Suite();
void TestFunc1(); // num += 10
void TestFunc2(); // num *= 2
void TestFunc3(); // num -= 5
protected:
BLocker *fLocker;
int fNum;
};
#endif // _example_test_h_