mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-26 11:52:54 +00:00
35 lines
512 B
C++
35 lines
512 B
C++
#ifndef TEST_POOL_H
|
|
#define TEST_POOL_H
|
|
#include <QtTest/QtTest>
|
|
#include <QtCore/QObject>
|
|
|
|
class PoolObject {
|
|
public:
|
|
PoolObject();
|
|
~PoolObject();
|
|
|
|
int foo;
|
|
};
|
|
|
|
class TestPool: public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
TestPool();
|
|
|
|
private slots:
|
|
void initTestCase();
|
|
|
|
void testSimpleAllocation();
|
|
void testObjectAllocation();
|
|
|
|
void testNewBlockAllocation();
|
|
|
|
void testWastedMemoryDueToBlockAllocation();
|
|
|
|
void benchManyPools();
|
|
void benchManyAllocations();
|
|
};
|
|
|
|
#endif
|
|
|