mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-26 11:52:54 +00:00
36 lines
512 B
C
36 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
|
||
|
|