mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
Update QsLog to 2.1 snapshot 46b643d5bcbc
This commit is contained in:
31
third_party/QsLog/unittest/QtTestUtil/QtTestUtil.h
vendored
Normal file
31
third_party/QsLog/unittest/QtTestUtil/QtTestUtil.h
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2008 Remko Troncon
|
||||
* Licensed under the MIT license.
|
||||
* See COPYING for license details.
|
||||
*/
|
||||
|
||||
#ifndef QtTestUtil_H
|
||||
#define QtTestUtil_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QtTest/QtTest>
|
||||
#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> TestClass##Registration
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user