diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2023-07-07 12:37:21 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2023-07-07 12:37:21 +0200 |
commit | febaef00017278ac65cb7e285564ebc9d5dadfe5 (patch) | |
tree | 940ac1386117785496334432dc03a3c0cfa02de5 /qhexedit2/test/testchunks.h | |
parent | f41f2dce18111c923c331a3fe6900edee731d040 (diff) | |
parent | 004b73ed7ef33cb407897f7eccbec5f3861f99d7 (diff) |
Merge commit '004b73ed7ef33cb407897f7eccbec5f3861f99d7' as 'qhexedit2'
Diffstat (limited to 'qhexedit2/test/testchunks.h')
-rw-r--r-- | qhexedit2/test/testchunks.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/qhexedit2/test/testchunks.h b/qhexedit2/test/testchunks.h new file mode 100644 index 0000000..1304125 --- /dev/null +++ b/qhexedit2/test/testchunks.h @@ -0,0 +1,32 @@ +#ifndef TESTASBYTEARRAY_H +#define TESTASBYTEARRAY_H + +#include <QBuffer> +#include <QByteArray> +#include <QString> +#include <QTextStream> + +#include "../src/chunks.h" + +class TestChunks +{ +public: + TestChunks(QTextStream &log, QString tName, int size, bool random=true, int saveFile=0x7fffffff); + void insert(qint64 pos, char b); + void overwrite(qint64 pos, char b); + void removeAt(qint64 pos); + void random(int count); + void compare(); + + +private: + QByteArray _data, _highlighted, _copy; + QBuffer _cData; + Chunks _chunks; + int _tCnt; + QString _tName; + int _saveFile; + QTextStream *_log; +}; + +#endif // TESTASBYTEARRAY_H |