diff options
Diffstat (limited to 'autotests/callcandidateseventtest.cpp')
-rw-r--r-- | autotests/callcandidateseventtest.cpp | 18 |
1 files changed, 14 insertions, 4 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) |