summaryrefslogtreecommitdiff
path: root/src/unitsuite.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-04-10 20:16:19 +0000
committerMike Buland <eichlan@xagasoft.com>2007-04-10 20:16:19 +0000
commit070374dde0f53bff26078550997f7682e84412e5 (patch)
treed9088b02e9b5f08f25d7f07f3a26035eea00e8e9 /src/unitsuite.h
parente7ab7cb1604c04763bbdcece5885e6ce5aa100b4 (diff)
downloadlibbu++-070374dde0f53bff26078550997f7682e84412e5.tar.gz
libbu++-070374dde0f53bff26078550997f7682e84412e5.tar.bz2
libbu++-070374dde0f53bff26078550997f7682e84412e5.tar.xz
libbu++-070374dde0f53bff26078550997f7682e84412e5.zip
I did it, the streams don't start with an S now.
Diffstat (limited to '')
-rw-r--r--src/unitsuite.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/unitsuite.h b/src/unitsuite.h
index db249b2..6e9270a 100644
--- a/src/unitsuite.h
+++ b/src/unitsuite.h
@@ -8,7 +8,42 @@
8namespace Bu 8namespace Bu
9{ 9{
10 /** 10 /**
11 * Provides a unit testing framework. This is pretty easy to use, probably
12 * the best way to get started is to use ch to generate a template, or use
13 * the code below with appropriate tweaks:
14 *@code
15 * #include "unitsuite.h"
16 *
17 * class Unit : public Bu::UnitSuite
18 * {
19 * public:
20 * Unit()
21 * {
22 * setName("Example");
23 * addTest( Unit::test );
24 * }
25 *
26 * virtual ~Unit() { }
27 *
28 * //
29 * // Tests go here
30 * //
31 * void test()
32 * {
33 * unitTest( 1 == 1 );
34 * }
35 * };
36 *
37 * int main( int argc, char *argv[] )
38 * {
39 * return Unit().run( argc, argv );
40 * }
11 * 41 *
42 @endcode
43 * The main function can contain other things, but using this one exactly
44 * makes all of the test suites work exactly the same. Using the optional
45 * setName at the top of the constructor replaces the class name with the
46 * chosen name when printing out stats and info.
12 */ 47 */
13 class UnitSuite 48 class UnitSuite
14 { 49 {