File: testchunks.h

package info (click to toggle)
ponyprog 3.1.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 11,488 kB
  • sloc: cpp: 35,376; python: 981; sh: 565; makefile: 41; ansic: 38
file content (32 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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