blob: 5319df132902125a8c3014437da3fea455b3074d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore>
#include "declare_metatype_noninline.h"
int main(int argc, char **argv)
{
qDebug("expect no warning here");
const int id = qRegisterMetaType<ToBeDeclaredMetaTypeNonInline>("ToBeDeclaredMetaTypeNonInline");
qDebug("expect a qfatal now");
const int result = ToBeDeclaredMetaTypeNonInline::triggerRegistration();
Q_ASSERT(id == result);
qDebug("if you read this, check that a qFatal was seen, "
"otherwise the test failed.");
}
|