Warning, file /pim/trojita/tests/Imap/test_Imap_Threading.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* Copyright (C) 2006 - 2014 Jan Kundrát <jkt@flaska.net> 0002 0003 This file is part of the Trojita Qt IMAP e-mail client, 0004 http://trojita.flaska.net/ 0005 0006 This program is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU General Public License as 0008 published by the Free Software Foundation; either version 2 of 0009 the License or (at your option) version 3 or any later version 0010 accepted by the membership of KDE e.V. (or its successor approved 0011 by the membership of KDE e.V.), which shall act as a proxy 0012 defined in Section 14 of version 3 of the license. 0013 0014 This program is distributed in the hope that it will be useful, 0015 but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 GNU General Public License for more details. 0018 0019 You should have received a copy of the GNU General Public License 0020 along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 */ 0022 0023 #ifndef TEST_IMAP_THREADING 0024 #define TEST_IMAP_THREADING 0025 0026 #include "Utils/LibMailboxSync.h" 0027 0028 typedef QMap<QString, int> Mapping; 0029 typedef QMap<QString, QPersistentModelIndex> IndexMapping; 0030 0031 /** @short Test the THREAD response processing and the ThreadingMsgListModel's correctness */ 0032 class ImapModelThreadingTest : public LibMailboxSync 0033 { 0034 Q_OBJECT 0035 private slots: 0036 void testStaticThreading(); 0037 void testStaticThreading_data(); 0038 void testDynamicThreading(); 0039 void testThreadDeletionsAdditions(); 0040 void testThreadDeletionsAdditions_data(); 0041 void testDynamicSorting(); 0042 void testDynamicSortingContext(); 0043 void testDynamicSearch(); 0044 void testIncrementalThreading(); 0045 void testRemovingRootWithThreadingInFlight(); 0046 void testMultipleExpunges(); 0047 void testVanishedHierarchyReplacement(); 0048 void testDataChangedUnknownUid(); 0049 void testThreadingPerformance(); 0050 void testSortingPerformance(); 0051 void testSearchingPerformance(); 0052 void testFlatThreadDeletionPerformance(); 0053 void testESearchResults(); 0054 0055 void helper_multipleExpunges(); 0056 protected slots: 0057 virtual void init(); 0058 private: 0059 void complexMapping(Mapping &m, QByteArray &response); 0060 static QByteArray prepareHugeUntaggedThread(const uint num); 0061 0062 void verifyMapping(const Mapping &mapping); 0063 QModelIndex findItem(const QString &where); 0064 IndexMapping buildIndexMap(const Mapping &mapping); 0065 void verifyIndexMap(const IndexMapping &indexMap, const Mapping &map); 0066 QByteArray treeToThreading(QModelIndex index); 0067 QByteArray numListToString(const Imap::Uids &seq); 0068 0069 QPersistentModelIndex helper_indexMultipleExpunges_1; 0070 int helper_multipleExpunges_hit; 0071 }; 0072 0073 #endif