aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest/quick/quicktestframework.cpp
blob: e48d37279b2eab027a5bcef743b0788f4b99bbb5 (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
40
41
42
43
44
45
46
47
48
49
50
51
// 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 "quicktestframework.h"
#include "quicktestparser.h"
#include "quicktesttreeitem.h"

#include "../autotestconstants.h"
#include "../autotesttr.h"
#include "../testframeworkmanager.h"
#include "../qtest/qttestconstants.h"

namespace Autotest {
namespace Internal {

ITestParser *QuickTestFramework::createTestParser()
{
    return new QuickTestParser(this);
}

ITestTreeItem *QuickTestFramework::createRootNode()
{
    return new QuickTestTreeItem(this, displayName(),
                                 Utils::FilePath(), ITestTreeItem::Root);
}

const char *QuickTestFramework::name() const
{
    return QuickTest::Constants::FRAMEWORK_NAME;
}

QString QuickTestFramework::displayName() const
{
    return Tr::tr("Quick Test");
}

unsigned QuickTestFramework::priority() const
{
    return 5;
}

ITestSettings *QuickTestFramework::testSettings()
{
    static const Utils::Id id
            = Utils::Id(Constants::FRAMEWORK_PREFIX).withSuffix(QtTest::Constants::FRAMEWORK_NAME);
    ITestFramework *qtTestFramework = TestFrameworkManager::frameworkForId(id);
    return qtTestFramework->testSettings();
}

} // namespace Internal
} // namespace Autotest