forked from qt-creator/qt-creator
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:
@@ -26,6 +26,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "target.h"
|
||||
#include "taskhub.h"
|
||||
|
||||
#include <projectexplorer/kit.h>
|
||||
|
||||
|
51
tests/unit/mockup/projectexplorer/taskhub.h
Normal file
51
tests/unit/mockup/projectexplorer/taskhub.h
Normal 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
|
@@ -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
|
||||
|
33
tests/unit/unittest/task.cpp
Normal file
33
tests/unit/unittest/task.cpp
Normal 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)
|
||||
{
|
||||
}
|
||||
}
|
@@ -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 \
|
||||
|
Reference in New Issue
Block a user