diff --git a/tests/unit/mockup/projectexplorer/project.h b/tests/unit/mockup/projectexplorer/project.h index 0cf902c8f91..e193ad404d7 100644 --- a/tests/unit/mockup/projectexplorer/project.h +++ b/tests/unit/mockup/projectexplorer/project.h @@ -26,6 +26,7 @@ #pragma once #include "target.h" +#include "taskhub.h" #include diff --git a/tests/unit/mockup/projectexplorer/taskhub.h b/tests/unit/mockup/projectexplorer/taskhub.h new file mode 100644 index 00000000000..b172068c68d --- /dev/null +++ b/tests/unit/mockup/projectexplorer/taskhub.h @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#pragma once + +#include + +namespace ProjectExplorer { + +class TaskHub: public QObject +{ +public: + + static TaskHub *instance() + { + return nullptr; + } + + static void addTask(Task::TaskType type, const QString &description, + Core::Id category) + { + } + + static void addTask(ProjectExplorer::Task task) + { + } +}; + +} // namespace ProjectExplorer diff --git a/tests/unit/unittest/CMakeLists.txt b/tests/unit/unittest/CMakeLists.txt index 029f31ea18a..4e7b97d53b7 100644 --- a/tests/unit/unittest/CMakeLists.txt +++ b/tests/unit/unittest/CMakeLists.txt @@ -155,6 +155,7 @@ add_qtc_test(unittest GTEST symbolquery-test.cpp symbolsfindfilter-test.cpp symbolstorage-test.cpp + task.cpp taskscheduler-test.cpp testenvironment.h tokenprocessor-test.cpp diff --git a/tests/unit/unittest/task.cpp b/tests/unit/unittest/task.cpp new file mode 100644 index 00000000000..88a2a80539b --- /dev/null +++ b/tests/unit/unittest/task.cpp @@ -0,0 +1,33 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#include + +namespace ProjectExplorer { +BuildSystemTask::BuildSystemTask(TaskType type, const QString &description, + const Utils::FilePath&, int line) +{ +} +} diff --git a/tests/unit/unittest/unittest.pro b/tests/unit/unittest/unittest.pro index c72d767ee0c..8f7ca8032a5 100644 --- a/tests/unit/unittest/unittest.pro +++ b/tests/unit/unittest/unittest.pro @@ -107,6 +107,7 @@ SOURCES += \ symbolindexertaskqueue-test.cpp \ refactoringprojectupdater-test.cpp \ processormanager-test.cpp \ + task.cpp \ taskscheduler-test.cpp \ compileroptionsbuilder-test.cpp \ progresscounter-test.cpp \