CMake Build: Fix unittests

Change-Id: I4282f2f80b1d8d1d902ac8252b8a826ca0e459c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2020-02-03 13:20:09 +01:00
parent abbc7aaf86
commit 3890473500
5 changed files with 87 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
#pragma once #pragma once
#include "target.h" #include "target.h"
#include "taskhub.h"
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>

View File

@@ -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

View File

@@ -155,6 +155,7 @@ add_qtc_test(unittest GTEST
symbolquery-test.cpp symbolquery-test.cpp
symbolsfindfilter-test.cpp symbolsfindfilter-test.cpp
symbolstorage-test.cpp symbolstorage-test.cpp
task.cpp
taskscheduler-test.cpp taskscheduler-test.cpp
testenvironment.h testenvironment.h
tokenprocessor-test.cpp tokenprocessor-test.cpp

View File

@@ -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)
{
}
}

View File

@@ -107,6 +107,7 @@ SOURCES += \
symbolindexertaskqueue-test.cpp \ symbolindexertaskqueue-test.cpp \
refactoringprojectupdater-test.cpp \ refactoringprojectupdater-test.cpp \
processormanager-test.cpp \ processormanager-test.cpp \
task.cpp \
taskscheduler-test.cpp \ taskscheduler-test.cpp \
compileroptionsbuilder-test.cpp \ compileroptionsbuilder-test.cpp \
progresscounter-test.cpp \ progresscounter-test.cpp \