summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2020-02-03 13:20:09 +0100
committerCristian Adam <cristian.adam@qt.io>2020-02-03 13:57:51 +0000
commit38904735002877c5647ba57d259fb0f2d34ff16d (patch)
tree05c51b6631b61bd3307ec2409c6a65692174d58f /tests
parentabbc7aaf86146b3e2b2e5e939511d27f5ced876a (diff)
downloadqt-creator-38904735002877c5647ba57d259fb0f2d34ff16d.tar.gz
CMake Build: Fix unittests
Change-Id: I4282f2f80b1d8d1d902ac8252b8a826ca0e459c6 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/mockup/projectexplorer/project.h1
-rw-r--r--tests/unit/mockup/projectexplorer/taskhub.h51
-rw-r--r--tests/unit/unittest/CMakeLists.txt1
-rw-r--r--tests/unit/unittest/task.cpp33
-rw-r--r--tests/unit/unittest/unittest.pro1
5 files changed, 87 insertions, 0 deletions
diff --git a/tests/unit/mockup/projectexplorer/project.h b/tests/unit/mockup/projectexplorer/project.h
index 0cf902c8f9..e193ad404d 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 <projectexplorer/kit.h>
diff --git a/tests/unit/mockup/projectexplorer/taskhub.h b/tests/unit/mockup/projectexplorer/taskhub.h
new file mode 100644
index 0000000000..b172068c68
--- /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 <projectexplorer/task.h>
+
+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 029f31ea18..4e7b97d53b 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 0000000000..88a2a80539
--- /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 <projectexplorer/task.h>
+
+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 c72d767ee0..8f7ca8032a 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 \