~hmatuschek/+junk/qdmr-package

« back to all changes in this revision

Viewing changes to test/crc32test.cc

  • Committer: Hannes Matuschek
  • Date: 2020-07-07 14:34:22 UTC
  • mto: (17.1.1 qdmr-package)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: hmatuschek@gmail.com-20200707143422-1djcxrjkem3k5kb1
Tags: upstream-0.3.0
ImportĀ upstreamĀ versionĀ 0.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "crc32test.hh"
 
2
#include "crc32.hh"
 
3
#include <QTest>
 
4
 
 
5
CRC32Test::CRC32Test(QObject *parent) : QObject(parent)
 
6
{
 
7
  // pass...
 
8
}
 
9
 
 
10
void
 
11
CRC32Test::testCRC32() {
 
12
  QString txt("The quick brown fox jumps over the lazy dog");
 
13
  CRC32 crc;
 
14
  crc.update(txt.toLocal8Bit());
 
15
  QCOMPARE(crc.get(), 0x414FA339U^0xFFFFFFFF);
 
16
}
 
17
 
 
18
QTEST_GUILESS_MAIN(CRC32Test)