summaryrefslogtreecommitdiffstats
path: root/tests/manual/qmetatype/tst_qmetatype.cpp
blob: 21c139200c53f2e8dc5c7490529b0bb8458ae63e (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

#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.");
}