diff options
author | Olivier Tilloy <olivier.tilloy@canonical.com> | 2012-12-04 09:14:04 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier.tilloy@canonical.com> | 2012-12-04 09:14:04 +0100 |
commit | 02cfba5c7f3781bb2d7cd2a4a55948efa4ed7918 (patch) | |
tree | 3e45b0052163bffa44c2f382923e5db944094817 /tests/client | |
parent | e8927d8a16a211c9994653bbb9ebbfd451e61c2b (diff) | |
download | qmenumodel-02cfba5c7f3781bb2d7cd2a4a55948efa4ed7918.tar.gz qmenumodel-02cfba5c7f3781bb2d7cd2a4a55948efa4ed7918.tar.bz2 qmenumodel-02cfba5c7f3781bb2d7cd2a4a55948efa4ed7918.zip |
Add a test to verify that normal menu items are not cached (only sub-menus are).
Diffstat (limited to 'tests/client')
-rw-r--r-- | tests/client/cachetest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/client/cachetest.cpp b/tests/client/cachetest.cpp index abd3331..8d5bd14 100644 --- a/tests/client/cachetest.cpp +++ b/tests/client/cachetest.cpp @@ -81,6 +81,19 @@ private Q_SLOTS: g_type_init(); } + // Verify that normal menu items are not cached (only sub-menus are) + void testCacheContents() + { + TestModel menu; + QVERIFY(menu.cacheIndexes().isEmpty()); + + menu.data(menu.index(1), QMenuModel::Label); + QVERIFY(menu.cacheIndexes().isEmpty()); + + menu.data(menu.index(2), QMenuModel::Action); + QVERIFY(menu.cacheIndexes().isEmpty()); + } + // Verify that the link attribute always returns the same cached menu void testStaticMenuCache() { |