
|
[openbeosstorage]
||
[Date Prev]
[03-2002 Date Index]
[Date Next]
||
[Thread Prev]
[03-2002 Thread Index]
[Thread Next]
[openbeosstorage] Testing Framework Up
- From: "Tyler Dauwalder" <tyler@xxxxxxxxxxxxx>
- To: <openbeosstorage@xxxxxxxxxxxxx>
- Date: Sun, 3 Mar 2002 23:27:51 -0800
I uploaded a working testing framework into CVS today.
storage_kit/test/Test.StorageKit.cpp is the main test program.
It gets compiled and linked into Test.StorageKit.R5 and
Test.StorageKit.OpenBeOS (linked to Be's and our Storage Kit
libraries respectively). The R5 tests should all fail and the
OpenBeOS tests should all pass, since I haven't added any
real tests yet, just examples.
Listener.h is a subclass of CppUnit::TestListener used for
outputting progress while tests are running.
NodeTest.h and PathTest.h are initial test classes for BNode
and BPath. The tests currently implemented are more for the
sake of example than anything else.
You can run the test programs with no arguments to run all
the available tests with the default verbosity level for output.
Or you can specify which tests to run. You can also specify
a different verbosity level, or just have the program list off
which classes have tests installed.
Run "Test.StorageKit.(OpenBeOS|R5) --help" for more
information.
To add tests for your classes, you'll need to do the following:
+ Make up a ClassTest.h file for your class (I've just been putting
all the implementation into the header; if you use a .cpp file too,
you'll have to edit the Jamfile). Just follow along with what I've done
in NodeTest.h and PathTest.h and let me know if you have any
problems or questions. All your tests will be implemented by this
class.
+ Add your header to Test.StorageKit.cpp and add your test class
to the list of installed test suites. These lines are marked with
special comments that look something like:
// ##### Add your header here #####
That should do it. Let me know if you have any trouble with it.
-Tyler
p.s. I believe there are CppUnit docs at http://cppunit.sf.net/
|

|