blob: 6dee5931efcebb43e9819a778e2e7e7bcdd89d2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#include "qmlprofilerattachdialog_test.h"
#include "projectexplorer/kitmanager.h"
#include "projectexplorer/kit.h"
#include <QtTest>
namespace QmlProfiler {
namespace Internal {
QmlProfilerAttachDialogTest::QmlProfilerAttachDialogTest(QObject *parent) : QObject(parent)
{
}
void QmlProfilerAttachDialogTest::testAccessors()
{
QmlProfilerAttachDialog dialog;
int port = dialog.port();
QVERIFY(port >= 0);
QVERIFY(port < 65536);
dialog.setPort(4444);
QCOMPARE(dialog.port(), 4444);
ProjectExplorer::KitManager *kitManager = ProjectExplorer::KitManager::instance();
QVERIFY(kitManager);
ProjectExplorer::Kit * const newKit = ProjectExplorer::KitManager::registerKit({}, "dings");
QVERIFY(newKit);
dialog.setKitId("dings");
QCOMPARE(dialog.kit(), newKit);
ProjectExplorer::KitManager::deregisterKit(newKit);
}
} // namespace Internal
} // namespace QmlProfiler
|