+ Moved BAutolock and BArchivable over to new testing framework.

+ Added ability to specify entire suites to the UnitTester program.
+ BAutolock and BArchivable tests now use CPPUNIT_ASSERT, but BLocker
tests crash for some unknown reason with said assertion, so plain old vanilla
assert() is still used. I'll look into this later.
+ BArchivable tests that try to load a RemoteTestObject are failing
because the resource file doesn't appear to be linked into
libsupporttest_RemoteTestObject.so.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@332 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder
2002-07-19 06:45:28 +00:00
parent da21df9f97
commit a6b33ea3de
34 changed files with 529 additions and 265 deletions
+13
View File
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <iostream>
#include <kernel/OS.h>
#include <TestUtils.h>
ExampleTest::ExampleTest(std::string name)
: BThreadedTestCase(name)
@@ -33,6 +34,13 @@ ExampleTest::Suite() {
caller->addThread("Thread3", &ExampleTest::TestFunc1);
suite->addTest(caller);
// And one that fails, if you're so inclined
caller = new BThreadedTestCaller<ExampleTest>("ExampleTests::MultiThreaded Failing Test");
caller->addThread("GoodThread1", &ExampleTest::TestFunc1);
caller->addThread("GoodThread2", &ExampleTest::TestFunc2);
caller->addThread("BadThread", &ExampleTest::FailureFunc);
suite->addTest(caller);
// And some single threaded ones
suite->addTest(new CppUnit::TestCaller<ExampleTest>("ExampleTests::SingleThreaded Test #1", &ExampleTest::TestFunc1));
suite->addTest(new CppUnit::TestCaller<ExampleTest>("ExampleTests::SingleThreaded Test #2", &ExampleTest::TestFunc2));
@@ -81,3 +89,8 @@ ExampleTest::TestFunc3() {
}
}
void
ExampleTest::FailureFunc() {
CHK(true == false);
}