diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-09-09 21:06:44 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-09-09 22:49:06 +0200 |
| commit | b5a7e751ffc654f15cdf9c3fc189254a50574074 (patch) | |
| tree | f4cb956c05b2754c753436df86aa3811c735f66b /tests/TestClient.h | |
| parent | 5c9605262c3e5aeeb35a3ec004dae5086dfc25cf (diff) | |
| download | qxmpp-b5a7e751ffc654f15cdf9c3fc189254a50574074.tar.gz | |
tests: TestClient: Add takePacket() and takeLastPacket()
Diffstat (limited to 'tests/TestClient.h')
| -rw-r--r-- | tests/TestClient.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/TestClient.h b/tests/TestClient.h index fcfa4fb2..9da12a97 100644 --- a/tests/TestClient.h +++ b/tests/TestClient.h @@ -49,6 +49,16 @@ public: QCOMPARE(m_sentPackets.takeFirst(), packet.replace(u'\'', u'"')); resetIdCount(); } + QString takePacket() + { + [this]() { QVERIFY(!m_sentPackets.isEmpty()); }(); + return m_sentPackets.takeFirst(); + } + QString takeLastPacket() + { + [this]() { QVERIFY(!m_sentPackets.isEmpty()); }(); + return m_sentPackets.takeLast(); + } void ignore() { m_sentPackets.takeFirst(); |
