Remove obsolete code from qtconcurrentiteratekernel test.

The removed code refers to WhileIteration, which does not exist.

Change-Id: I4c44bc319ac776d16ce9ba7b5c2938ce1642a3f6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-10-31 11:32:22 +10:00 committed by Qt by Nokia
parent 5a71947ee4
commit 9d606227c6

View File

@ -100,11 +100,6 @@ private slots:
void blockSize();
void multipleResults();
#endif
#if 0
//"while" iterations tests:
void instantiateWhile();
void stresstestWhile();
#endif
};
QAtomicInt iterations;
@ -309,45 +304,6 @@ void tst_QtConcurrentIterateKernel::multipleResults()
}
#endif
#if 0
class PrintWhile : public IterateKernel<TestIterator, void>
{
public:
PrintWhile() : IterateKernel<TestIterator, void>(0, 10, WhileIteration) { }
bool runIteration(TestIterator it, TestIterator, void *)
{
return false;
}
};
void tst_QtConcurrentIterateKernel::instantiateWhile()
{
PrintWhile w;
w.startBlocking();
}
QAtomicInt iterationCount;
class StressWhile : public IterateKernel<TestIterator, void>
{
public:
StressWhile(TestIterator iterations) : IterateKernel<TestIterator, void>(0, iterations, WhileIteration) { }
bool runIteration(TestIterator it, TestIterator index, void *)
{
if (it == index) // should match.
::iterationCount.ref();
return false;
}
};
void tst_QtConcurrentIterateKernel::stresstestWhile()
{
int iterations = 100000;
StressWhile w(iterations);
w.startBlocking();
QCOMPARE(int(iterationCount), iterations);
}
#endif
QTEST_MAIN(tst_QtConcurrentIterateKernel)
#include "tst_qtconcurrentiteratekernel.moc"