--Boundary-00=_E3VWDNh3JpQhAFc
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Am Friday 21 October 2005 22:47 schrieb Adriaan de Groot:
> I'd be pretty hesitant to write dox for this; it's not like KUnitTest is
> widely used. There are surely more low-hanging fruit to be had (KAccel*
> comes to mind, it's missing tons of things) as well as -- more important --
> overview writing. Forward-porting dox is becoming harder as well,now that
> char * name is gone everywhere and patches can't be applied. Frankly, I'm
> starting to think that apidox volunteers -- as opposed to class / library
> authors who are supposed to also maintain their apidox -- should be working
> on KDE 4 dox, in spite of the volatility that's out there.


I didn't write lots of documentation. I just fixed it so that macros would be
shown in the generated dox. See attachment. Also note that I'm now a proud
owner of an SVN account so you don't need to commit ... IF you tell me where
I can find more information about the DOX tag

Thanks!
--Thomas

--Boundary-00=_E3VWDNh3JpQhAFc
Content-Type: text/x-diff;
charset="iso-8859-1";
name="kunittest_dox.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="kunittest_dox.diff"

Index: runner.h
================================================== =================
--- runner.h (revision 472669)
+++ runner.h (working copy)
@@ -1,4 +1,4 @@
-/**
+/*
* kunittest.h
*
* Copyright (C) 2004 Zack Rusin
@@ -25,6 +25,11 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

+/*!
+ * @file runner.h
+ * Defines a set of macros and classes for running unit tests
+ */
+
#ifndef KUNITTEST_RUNNER_H
#define KUNITTEST_RUNNER_H

Index: tester.cpp
================================================== =================
--- tester.cpp (revision 472669)
+++ tester.cpp (working copy)
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (C) 2005 Jeroen Wijnhout
*
* Redistribution and use in source and binary forms, with or without
Index: samplemodule.cpp
================================================== =================
--- samplemodule.cpp (revision 472669)
+++ samplemodule.cpp (working copy)
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (C) 2005 Jeroen Wijnhout
*
* Redistribution and use in source and binary forms, with or without
Index: modrunner.cpp
================================================== =================
--- modrunner.cpp (revision 472669)
+++ modrunner.cpp (working copy)
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (C) 2005 Jeroen Wijnhout
*
* Redistribution and use in source and binary forms, with or without
Index: runner.cpp
================================================== =================
--- runner.cpp (revision 472669)
+++ runner.cpp (working copy)
@@ -1,4 +1,4 @@
-/**
+/*
*
* Copyright (C) 2004 Zack Rusin
* Copyright (C) 2005 Jeroen Wijnhout
Index: module.h
================================================== =================
--- module.h (revision 472669)
+++ module.h (working copy)
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (C) 2005 Jeroen Wijnhout
*
* Redistribution and use in source and binary forms, with or without
@@ -23,6 +23,11 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

+/*!
+ * @file module.h
+ * Provides macros to ease building unit tests as shared libraries
+ */
+
#ifndef KUNITTEST_MODULE_H
#define KUNITTEST_MODULE_H

Index: tester.h
================================================== =================
--- tester.h (revision 472669)
+++ tester.h (working copy)
@@ -1,4 +1,4 @@
-/**
+/*
* tester.h
*
* Copyright (C) 2004 Zack Rusin
@@ -100,9 +100,9 @@
* }
* @endcode
*
- * CHECK is implemented using a template, so you get type safe
+ * CHECK() is implemented using a template, so you get type safe
* comparison. All that is needed is that the argument types have an
- * operator==() defined.
+ * @c operator==() defined.
*
* Now that you did that the only other thing to do is to tell the
* framework to add this test case, by using the KUNITTEST_REGISTER_TESTER(x) macro. Just
@@ -215,13 +215,13 @@
* KUNITTEST_MODULE_REGISTER_TESTER( SomeSampleTester );
* @endcode
*
- * The first macro, KUNITTEST_MODULE, makes sure that the module can be loaded and that
+ * The first macro, KUNITTEST_MODULE(), makes sure that the module can be loaded and that
* the test classes are created. The first argument "kunittest_samplemodule" is the library
* name, in this case the library we're creating a kunittest_samplemodule.la module. The
* second argument is name which will appear in the test runner for this test suite.
*
- * The tester class are now added by the KUNITTEST_MODULE_REGISTER_TESTER macro, not the
- * KUNITTEST_REGISTER_TESTER. The only difference between the two is that you have to
+ * The tester class are now added by the KUNITTEST_MODULE_REGISTER_TESTER() macro, not the
+ * KUNITTEST_REGISTER_TESTER(). The only difference between the two is that you have to
* pass the module class name to this macro.
*
* The Makefile.am is also a bit different, but not much:
@@ -290,7 +290,7 @@
*
* KUnitTest comes with simple support for testing whether an exception, such as a function call,
* throws an exception or not. Simply, for the usual macros there corresponding ones for
- * exception testing: CHECK_EXCEPTION, XFAIL_EXCEPTION, and SKIP_EXCEPTION. They all take two
+ * exception testing: CHECK_EXCEPTION(), XFAIL_EXCEPTION(), and SKIP_EXCEPTION(). They all take two
* arguments: the expression that will catch the exception, and the expression that is supposed
* to throw the exception.
*
@@ -317,6 +317,11 @@
* These scripts are part of the kdesdk/kunittest module.
*/

+/*!
+ * @file tester.h
+ * Defines macros for unit testing as well as some test classes.
+ */
+
#include
using namespace std;

@@ -351,7 +356,7 @@
#define SKIP( x ) skip( __FILE__, __LINE__, QString::fromLatin1(#x))

/*!
- * An macro testing that @p expression throws an exception that is catched
+ * A macro testing that @p expression throws an exception that is catched
* with @p exceptionCatch. Use it to test that an expression, such as a function call,
* throws a certain exception.
*
@@ -409,6 +414,9 @@
skip( __FILE__, __LINE__, QString("Exception catch: ")\
.arg(QString(#exceptionCatch)).arg(QString(" Test expression: ")).arg(QString(#expression)))

+/**
+ * Namespace for Unit testing classes
+ */
namespace KUnitTest
{
/*! A simple class that encapsulates a test result. A Tester class usually
Index: samplemodule.h
================================================== =================
--- samplemodule.h (revision 472669)
+++ samplemodule.h (working copy)
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (C) 2005 Jeroen Wijnhout
*
* Redistribution and use in source and binary forms, with or without

--Boundary-00=_E3VWDNh3JpQhAFc
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


--Boundary-00=_E3VWDNh3JpQhAFc--