summaryrefslogtreecommitdiffstats
path: root/tests/auto/repc/signature/mismatch.cpp
blob: 369a30ce30a1fadca5c8d66aaf94eb148ad7ab20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (C) 2017 Ford Motor Company
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#include "rep_mismatch_replica.h"

#include <QCoreApplication>
#include <QtRemoteObjects/qremoteobjectnode.h>
#include <QtTest/QtTest>

class tst_Mismatch_Process : public QObject
{
    Q_OBJECT

private Q_SLOTS:
    void testRun()
    {
        QRemoteObjectNode repNode;
        repNode.connectToNode(QUrl(QStringLiteral("tcp://127.0.0.1:65214")));
        QTest::ignoreMessage(QtWarningMsg, " Signature mismatch for TestClassReplica \"TestClass\"");
        QSharedPointer<TestClassReplica> rep(repNode.acquire<TestClassReplica>());
        QTRY_COMPARE(rep->state(), QRemoteObjectReplica::SignatureMismatch);
    }
};

QTEST_MAIN(tst_Mismatch_Process)

#include "mismatch.moc"