aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests.cpp')
-rw-r--r--tests/tests.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp
index c9868ad0..22c3eeba 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -51,6 +51,15 @@ void TestUtils::testHmac()
QCOMPARE(hmac, QByteArray::fromHex("56be34521d144c88dbb8c733f0e8b3f6"));
}
+void TestUtils::testCrc32()
+{
+ quint32 crc = generateCrc32(QByteArray());
+ QCOMPARE(crc, 0u);
+
+ crc = generateCrc32(QByteArray("Hi There"));
+ QCOMPARE(crc, 0xDB143BBEu);
+}
+
template <class T>
static void parsePacket(T &packet, const QByteArray &xml)
{