Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/language/duchain/tests/test_topcontextstore.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * This file is part of KDevelop | ||||
3 | * | ||||
4 | * Copyright 2018 R.J.V. Bertin <rjvbertin@gmail.com> | ||||
5 | * | ||||
6 | * This program is free software; you can redistribute it and/or modify | ||||
7 | * it under the terms of the GNU Library General Public License as | ||||
8 | * published by the Free Software Foundation; either version 2 of the | ||||
9 | * License, or (at your option) any later version. | ||||
10 | * | ||||
11 | * This program is distributed in the hope that it will be useful, | ||||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
14 | * GNU General Public License for more details. | ||||
15 | * | ||||
16 | * You should have received a copy of the GNU General Public | ||||
17 | * License along with this program; if not, write to the | ||||
18 | * Free Software Foundation, Inc., | ||||
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
20 | */ | ||||
21 | | ||||
22 | #ifndef KDEVPLATFORM_TEST_TOPCONTEXTSTORE_H | ||||
23 | #define KDEVPLATFORM_TEST_TOPCONTEXTSTORE_H | ||||
24 | | ||||
25 | #include <QObject> | ||||
26 | #include <QVector> | ||||
27 | #include <QByteArray> | ||||
28 | | ||||
29 | class TestTopDUContextStore : public QObject | ||||
30 | { | ||||
31 | Q_OBJECT | ||||
32 | private Q_SLOTS: | ||||
33 | void initTestCase(); | ||||
34 | void cleanupTestCase(); | ||||
35 | void testTopContextStore_data(); | ||||
36 | void testTopContextStore(); | ||||
37 | | ||||
38 | void benchTopContextStore_data(); | ||||
39 | void benchTopContextStore(); | ||||
40 | void benchTopContextStoreRead(); | ||||
41 | void benchTopContextStoreRemove(); | ||||
42 | void benchTopContextStoreFlush(); | ||||
43 | | ||||
44 | private: | ||||
45 | static uint testKeys; | ||||
46 | static uint benchKeys; | ||||
47 | QByteArray realData; | ||||
48 | QVector<QByteArray> benchValues; | ||||
49 | }; | ||||
50 | | ||||
51 | #endif // KDEVPLATFORM_TEST_TOPCONTEXTSTORE_H |