aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-20 17:22:43 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-20 17:22:43 (GMT)
commit02c94fbb7317ba91ab021e1b9af41cf8579cff96 (patch)
tree473ff81392dfbde8aa2668e74047633cbed4fe17
parent7bbc7320d3f77ee301b244dec43d5182bcd2b56e (diff)
split unit tests
-rw-r--r--CMakeLists.txt3
-rw-r--r--autotests/CMakeLists.txt15
-rw-r--r--kate/CMakeLists.txt3
-rw-r--r--kate/autotests/CMakeLists.txt23
-rw-r--r--kate/autotests/session_manager_test.cpp (renamed from autotests/session_manager_test.cpp)0
-rw-r--r--kate/autotests/session_manager_test.h (renamed from autotests/session_manager_test.h)0
-rw-r--r--kate/autotests/session_test.cpp (renamed from autotests/session_test.cpp)0
-rw-r--r--kate/autotests/session_test.h (renamed from autotests/session_test.h)0
-rw-r--r--kate/autotests/sessions_action_test.cpp (renamed from autotests/sessions_action_test.cpp)0
-rw-r--r--kate/autotests/sessions_action_test.h (renamed from autotests/sessions_action_test.h)0
10 files changed, 26 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d7663d..64315d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,6 +77,3 @@ ecm_optional_add_subdirectory (addons)
# docs
ecm_optional_add_subdirectory (doc)
-
-# automatic unit tests
-ecm_optional_add_subdirectory (autotests)
diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index f3b8301..b208e8c 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -7,21 +7,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/addons/kate/filetree
)
-macro(kate_executable_tests)
- foreach(_testname ${ARGN})
- add_executable(${_testname} ${_testname}.cpp)
- add_test(kateapp-${_testname} ${_testname})
- target_link_libraries(${_testname} kdeinit_kate Qt5::Test)
- ecm_mark_as_test(${_testname})
- endforeach(_testname)
-endmacro(kate_executable_tests)
-
-kate_executable_tests(
- session_test
- session_manager_test
- sessions_action_test
-)
-
macro(filetree_executable_tests)
foreach(_testname ${ARGN})
add_executable(${_testname} ${_testname}.cpp document_dummy.cpp)
diff --git a/kate/CMakeLists.txt b/kate/CMakeLists.txt
index 2e3e435..8c57719 100644
--- a/kate/CMakeLists.txt
+++ b/kate/CMakeLists.txt
@@ -65,3 +65,6 @@ generate_export_header(kdeinit_kate
# install executable + kdeinit lib
install(TARGETS kate ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kdeinit_kate ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+# automatic unit tests
+ecm_optional_add_subdirectory (autotests)
diff --git a/kate/autotests/CMakeLists.txt b/kate/autotests/CMakeLists.txt
new file mode 100644
index 0000000..dd1a4df
--- /dev/null
+++ b/kate/autotests/CMakeLists.txt
@@ -0,0 +1,23 @@
+
+include(ECMMarkAsTest)
+
+include_directories(
+ ${CMAKE_SOURCE_DIR}/kate/app
+ ${CMAKE_SOURCE_DIR}/kate/session
+ ${CMAKE_SOURCE_DIR}/addons/kate/filetree
+)
+
+macro(kate_executable_tests)
+ foreach(_testname ${ARGN})
+ add_executable(${_testname} ${_testname}.cpp)
+ add_test(kateapp-${_testname} ${_testname})
+ target_link_libraries(${_testname} kdeinit_kate Qt5::Test)
+ ecm_mark_as_test(${_testname})
+ endforeach(_testname)
+endmacro(kate_executable_tests)
+
+kate_executable_tests(
+ session_test
+ session_manager_test
+ sessions_action_test
+)
diff --git a/autotests/session_manager_test.cpp b/kate/autotests/session_manager_test.cpp
index e9f4920..e9f4920 100644
--- a/autotests/session_manager_test.cpp
+++ b/kate/autotests/session_manager_test.cpp
diff --git a/autotests/session_manager_test.h b/kate/autotests/session_manager_test.h
index 30d0c36..30d0c36 100644
--- a/autotests/session_manager_test.h
+++ b/kate/autotests/session_manager_test.h
diff --git a/autotests/session_test.cpp b/kate/autotests/session_test.cpp
index 74addb2..74addb2 100644
--- a/autotests/session_test.cpp
+++ b/kate/autotests/session_test.cpp
diff --git a/autotests/session_test.h b/kate/autotests/session_test.h
index f4a3376..f4a3376 100644
--- a/autotests/session_test.h
+++ b/kate/autotests/session_test.h
diff --git a/autotests/sessions_action_test.cpp b/kate/autotests/sessions_action_test.cpp
index 9a0af3a..9a0af3a 100644
--- a/autotests/sessions_action_test.cpp
+++ b/kate/autotests/sessions_action_test.cpp
diff --git a/autotests/sessions_action_test.h b/kate/autotests/sessions_action_test.h
index 7dd20b4..7dd20b4 100644
--- a/autotests/sessions_action_test.h
+++ b/kate/autotests/sessions_action_test.h