diff -r dee5afe5301f -r 3f74d0d4af4c tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp --- a/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp Mon Mar 15 12:43:09 2010 +0200 +++ b/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp Thu Apr 08 14:19:33 2010 +0300 @@ -71,6 +71,8 @@ void contiguousCacheBenchmark(); void setCapacity(); + + void zeroCapacity(); }; QTEST_MAIN(tst_QContiguousCache) @@ -476,4 +478,14 @@ } } +void tst_QContiguousCache::zeroCapacity() +{ + QContiguousCache contiguousCache; + QCOMPARE(contiguousCache.capacity(),0); + contiguousCache.setCapacity(10); + QCOMPARE(contiguousCache.capacity(),10); + contiguousCache.setCapacity(0); + QCOMPARE(contiguousCache.capacity(),0); +} + #include "tst_qcontiguouscache.moc"