diff -r afe194b6b1cd -r cf5c74390b98 qcpix/tsrc/qttestutil/qttestutil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qcpix/tsrc/qttestutil/qttestutil.h Wed Aug 18 10:53:26 2010 +0300 @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2008 Remko Troncon + * Licensed under the MIT license. + * See COPYING for license details. + */ + +#ifndef QtTestUtil_H +#define QtTestUtil_H + +#include "QtTestUtil/TestRegistration.h" + +/** + * A macro to register a test class. + * + * This macro will create a static variable which registers the + * testclass with the TestRegistry, and creates an instance of the + * test class. + * + * Execute this macro in the body of your unit test's .cpp file, e.g. + * class MyTest { + * ... + * }; + * + * QTTESTUTIL_REGISTER_TEST(MyTest) + */ +#define QTTESTUTIL_REGISTER_TEST(TestClass) \ + static QtTestUtil::TestRegistration TestClass##Registration + +#endif