diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-02-23 05:46:14 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-02-23 06:29:52 (GMT) |
commit | eefe993a4241b48f14991c44baa2c074b10bc194 (patch) | |
tree | a1a6ecdeb90c17707839c9c5e9cb8776ec4ff97f /tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp | |
parent | f8eee22dcdd9b6b530c0e5c346e16552352ec03b (diff) | |
parent | e988763395625171bed001b5916d4da003d39aee (diff) | |
download | Qt-eefe993a4241b48f14991c44baa2c074b10bc194.zip Qt-eefe993a4241b48f14991c44baa2c074b10bc194.tar.gz Qt-eefe993a4241b48f14991c44baa2c074b10bc194.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp')
-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" |