Projekt

Obecné

Profil

Stáhnout (716 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
/*
2
 * Copyright (C) 2008  Remko Troncon
3
 * Licensed under the MIT license.
4
 * See COPYING for license details.
5
 */
6

    
7
#ifndef QtTestUtil_H
8
#define QtTestUtil_H
9

    
10
#include <QObject>
11
#include <QtTest/QtTest>
12
#include "QtTestUtil/TestRegistration.h"
13

    
14
/**
15
 * A macro to register a test class.
16
 *
17
 * This macro will create a static variable which registers the
18
 * testclass with the TestRegistry, and creates an instance of the 
19
 * test class.
20
 *
21
 * Execute this macro in the body of your unit test's .cpp file, e.g.
22
 *    class MyTest {
23
 *			...
24
 *		};
25
 *
26
 *		QTTESTUTIL_REGISTER_TEST(MyTest)
27
 */
28
#define QTTESTUTIL_REGISTER_TEST(TestClass) \
29
	static QtTestUtil::TestRegistration<TestClass> TestClass##Registration
30

    
31
#endif
(1-1/5)