cf12defd28
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
39 lines
679 B
C++
39 lines
679 B
C++
/* This file is part of the KDE project
|
|
SPDX-FileCopyrightText: 2009 Pino Toscano <pino@kde.org>
|
|
|
|
SPDX-License-Identifier: LGPL-2.0-or-later
|
|
*/
|
|
|
|
#ifndef KLIMITEDIODEVICETEST_H
|
|
#define KLIMITEDIODEVICETEST_H
|
|
|
|
#include <QBuffer>
|
|
#include <QByteArray>
|
|
#include <QList>
|
|
#include <QObject>
|
|
|
|
struct ChunkData {
|
|
QByteArray data;
|
|
int offset;
|
|
};
|
|
|
|
class KLimitedIODeviceTest : public QObject
|
|
{
|
|
Q_OBJECT
|
|
private Q_SLOTS:
|
|
void initTestCase();
|
|
|
|
void testReadChunks_data();
|
|
void testReadChunks();
|
|
void testSeeking();
|
|
|
|
private:
|
|
void addChunk(const QByteArray &chunk);
|
|
|
|
QByteArray m_data;
|
|
QBuffer m_buffer;
|
|
QList<ChunkData> m_chunks;
|
|
};
|
|
|
|
#endif
|