summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-02-17 15:36:59 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-02-17 15:36:59 (GMT)
commit54b20c491f7e182f6b98f65b7e9e8e68286d6109 (patch)
tree7f17d6b2540ea226eb7d8d1b830f31f1a032316a /tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp
parentdcb2678f39345b66c5303e74c156654a8d13fe83 (diff)
parent17a0a50a101fc9863d0dffd0dcb887ba68a99622 (diff)
downloadQt-54b20c491f7e182f6b98f65b7e9e8e68286d6109.zip
Qt-54b20c491f7e182f6b98f65b7e9e8e68286d6109.tar.gz
Qt-54b20c491f7e182f6b98f65b7e9e8e68286d6109.tar.bz2
Merge branch '4.6' into qt-master-from-4.6
Conflicts: mkspecs/common/symbian/symbian.conf src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tools/assistant/tools/assistant/helpviewer.cpp
Diffstat (limited to 'tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp')
-rw-r--r--tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp b/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp
index 5a23274..f64e815 100644
--- a/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp
+++ b/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp
@@ -71,6 +71,8 @@ private slots:
void contiguousCacheBenchmark();
void setCapacity();
+
+ void zeroCapacity();
};
QTEST_MAIN(tst_QContiguousCache)
@@ -476,4 +478,14 @@ void tst_QContiguousCache::setCapacity()
}
}
+void tst_QContiguousCache::zeroCapacity()
+{
+ QContiguousCache<int> contiguousCache;
+ QCOMPARE(contiguousCache.capacity(),0);
+ contiguousCache.setCapacity(10);
+ QCOMPARE(contiguousCache.capacity(),10);
+ contiguousCache.setCapacity(0);
+ QCOMPARE(contiguousCache.capacity(),0);
+}
+
#include "tst_qcontiguouscache.moc"