diff options
author | Martin Smith <msmith@trolltech.com> | 2010-02-16 07:16:45 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-02-16 07:16:45 (GMT) |
commit | 20c00cc256c4c588fdf137de13bdc83d4eb3cc8f (patch) | |
tree | 5f7d86a9737f0254124d81f76ae3e7e41c4588ca /tests/auto | |
parent | 791601cf2bef4f097f5da82b95a05fa731118b40 (diff) | |
parent | 1a5c3af0f3e75a518c27c6bdd3f58896a49b167e (diff) | |
download | Qt-20c00cc256c4c588fdf137de13bdc83d4eb3cc8f.zip Qt-20c00cc256c4c588fdf137de13bdc83d4eb3cc8f.tar.gz Qt-20c00cc256c4c588fdf137de13bdc83d4eb3cc8f.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp | 12 |
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" |