[openbeos] Unit test
- From: "Brian Matzon" <brian@xxxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Mon, 22 Apr 2002 17:54:15 PDT (-0700)
While implemenenting the BBitmapStream test
I have stumpled upon a "bug" in which the
DetachBitmap method does not work except if I am a BApplication.
The way I have done this untill now, was to create a BApplication that
would perform the actual test. From
TranslatorRosterTest::MakeConfigurationViewTest:
------
..
//create test app
ViewTest* test = new ViewTest(roster);
test->Run();
//get test result
bool worked = test->Worked();
delete test;
if(worked) {
return B_OK;
} else {
return B_ERROR;
}
..
------
But having to do so is quite annoying, and if I had multiple stuff to
test, that requires
a BApplication instance I would have to make a single BApplication that
could test
multiple stuff.
Is this really the solution, or would multiple inheritance between Test
(cppunit) and
BApplication be a better way?
/Brian Matzon
Other related posts: