Skip to content

Commit c39fea3

Browse files
committed
Tests: Add framework for testing Start
1 parent 8e12727 commit c39fea3

File tree

5 files changed

+55
-0
lines changed

5 files changed

+55
-0
lines changed

tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ endif(BUILD_SKETCHER)
120120
if(BUILD_SPREADSHEET)
121121
list (APPEND TestExecutables Spreadsheet_tests_run)
122122
endif()
123+
if(BUILD_START)
124+
list (APPEND TestExecutables Start_tests_run)
125+
endif()
123126

124127
# -------------------------
125128

tests/src/Mod/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ endif(BUILD_SKETCHER)
2828
if(BUILD_SPREADSHEET)
2929
add_subdirectory(Spreadsheet)
3030
endif()
31+
if(BUILD_START)
32+
add_subdirectory(Start)
33+
endif()
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
target_sources(
2+
Start_tests_run
3+
PRIVATE
4+
${CMAKE_CURRENT_SOURCE_DIR}/ThumbnailSource.cpp
5+
)
6+
7+
target_include_directories(
8+
Start_tests_run
9+
PUBLIC
10+
${CMAKE_BINARY_DIR}
11+
)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// SPDX-License-Identifier: LGPL-2.1-or-later
2+
3+
#include <gtest/gtest.h>
4+
#include "src/App/InitApplication.h"
5+
6+
#include <memory>
7+
8+
#include <Mod/Start/App/ThumbnailSource.h>
9+
10+
class ThumbnailSourceTest: public ::testing::Test
11+
{
12+
protected:
13+
static void SetUpTestSuite()
14+
{
15+
tests::initApplication();
16+
}
17+
18+
void SetUp() override
19+
{}
20+
21+
void TearDown() override
22+
{}
23+
24+
25+
private:
26+
};

tests/src/Mod/Start/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
target_include_directories(Start_tests_run PUBLIC
3+
${Python3_INCLUDE_DIRS}
4+
)
5+
6+
target_link_libraries(Start_tests_run
7+
gtest_main
8+
${Google_Tests_LIBS}
9+
Start
10+
)
11+
12+
add_subdirectory(App)

0 commit comments

Comments
 (0)