Commit 0e6d8f88 authored by Boudewijn Rempt's avatar Boudewijn Rempt

add clear test

svn path=/trunk/koffice/; revision=1079703
parent 3eb5a8ef
......@@ -103,5 +103,19 @@ void KisDatamanagerBenchmark::benchmarkExtent()
}
}
void KisDatamanagerBenchmark::benchmarkClear()
{
quint8 *p = new quint8[3];
memset(p, 128, 3);
KisDataManager dm(3, p);
quint8 *bytes = new quint8[3 * 1021 * 1084];
memset(bytes, 0, 3 * 1021 * 1084);
dm.writeBytes(bytes, 0, 0, 1021, 1084);
QBENCHMARK {
dm.clear(0, 0, 1024, 1024, p);
}
}
QTEST_KDEMAIN(KisDatamanagerBenchmark, GUI)
#include "kis_datamanager_benchmark.moc"
......@@ -33,6 +33,7 @@ private slots:
void benchmarkReadBytes();
void benchmarkReadWriteBytes();
void benchmarkExtent();
void benchmarkClear();
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment