Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions plugins/Observability/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ ENDIF()

ADD_LIBRARY(Observability-static STATIC ${Observability_SRCS} ${Observability_RES_CXX} ${ObservabilityDialog_UIS_H})
TARGET_LINK_LIBRARIES(Observability-static Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets)

IF(ENABLE_TESTING)
add_definitions("-DWITH_TESTING_ON")
ADD_SUBDIRECTORY(test)
ENDIF(ENABLE_TESTING)

SET_TARGET_PROPERTIES(Observability-static PROPERTIES OUTPUT_NAME "Observability")
SET_TARGET_PROPERTIES(Observability-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins Observability-static)
Expand Down
10 changes: 10 additions & 0 deletions plugins/Observability/src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)

FIND_PACKAGE(Qt${QT_VERSION_MAJOR} COMPONENTS Test REQUIRED)

ADD_EXECUTABLE(testObservability testObservability.hpp testObservability.cpp)
TARGET_LINK_LIBRARIES(testObservability Qt${QT_VERSION_MAJOR}::Test Observability-static stelMain)
ADD_TEST(testObservability testObservability)
SET_TARGET_PROPERTIES(testObservability PROPERTIES FOLDER "plugins/Observability/test")

33 changes: 33 additions & 0 deletions plugins/Observability/src/test/testObservability.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Stellarium
* Copyright (C) 2020 Georg Zotti
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/

#include "testObservability.hpp"

#include <QString>
#include <QDebug>
#include <QtGlobal>
#include <QVariantList>
#include <QMap>

QTEST_GUILESS_MAIN(TestObservability)

void TestObservability::testDummy()
{
}

33 changes: 33 additions & 0 deletions plugins/Observability/src/test/testObservability.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Stellarium
* Copyright (C) 2020 Georg Zotti
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/


#ifndef TESTOBSERVABILITY_HPP
#define TESTOBSERVABILITY_HPP

#include <QtTest/QtTest>

class TestObservability : public QObject
{
Q_OBJECT
private slots:
void testDummy();
};

#endif // _TESTOBSERVABILITY_HPP