diff options
Diffstat (limited to 'autotests')
-rw-r--r-- | autotests/callcandidateseventtest.cpp | 18 | ||||
-rw-r--r-- | autotests/callcandidateseventtest.h | 13 |
2 files changed, 14 insertions, 17 deletions
diff --git a/autotests/callcandidateseventtest.cpp b/autotests/callcandidateseventtest.cpp index f103e4d3..1a69cb66 100644 --- a/autotests/callcandidateseventtest.cpp +++ b/autotests/callcandidateseventtest.cpp @@ -3,7 +3,16 @@ // SPDX-License-Identifier: LGPL-2.1-or-later #include "events/callcandidatesevent.h" -#include "callcandidateseventtest.h" + +#include <QtTest/QtTest> + +class TestCallCandidatesEvent : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void fromJson(); +}; void TestCallCandidatesEvent::fromJson() { @@ -34,13 +43,14 @@ void TestCallCandidatesEvent::fromJson() Quotient::CallCandidatesEvent callCandidatesEvent(object); QCOMPARE(callCandidatesEvent.version(), 0); - QCOMPARE(callCandidatesEvent.callId(), "12345"); + QCOMPARE(callCandidatesEvent.callId(), QStringLiteral("12345")); QCOMPARE(callCandidatesEvent.candidates().count(), 1); const QJsonObject &candidate = callCandidatesEvent.candidates().at(0).toObject(); - QCOMPARE(candidate.value("sdpMid").toString(), "audio"); + QCOMPARE(candidate.value("sdpMid").toString(), QStringLiteral("audio")); QCOMPARE(candidate.value("sdpMLineIndex").toInt(), 0); - QCOMPARE(candidate.value("candidate").toString(), "candidate:863018703 1 udp 2122260223 10.9.64.156 43670 typ host generation 0"); + QCOMPARE(candidate.value("candidate").toString(), + QStringLiteral("candidate:863018703 1 udp 2122260223 10.9.64.156 43670 typ host generation 0")); } QTEST_MAIN(TestCallCandidatesEvent) diff --git a/autotests/callcandidateseventtest.h b/autotests/callcandidateseventtest.h deleted file mode 100644 index b81c9c9b..00000000 --- a/autotests/callcandidateseventtest.h +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: 2020 Carl Schwan <carlschwan@kde.org> -// -// SPDX-License-Identifier: LGPL-2.1-or-later - -#include <QtTest/QtTest> - -class TestCallCandidatesEvent : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void fromJson(); -}; |