2021-02-09 19:31:40 +00:00
|
|
|
include_directories(${KWin_SOURCE_DIR}/src)
|
2014-06-10 09:14:59 +00:00
|
|
|
add_definitions(-DKWIN_UNIT_TEST)
|
2012-07-21 09:25:17 +00:00
|
|
|
########################################################
|
|
|
|
# Test TabBox::ClientModel
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testTabBoxClientModel_SRCS
|
2021-02-09 19:31:40 +00:00
|
|
|
../../src/tabbox/clientmodel.cpp
|
|
|
|
../../src/tabbox/desktopmodel.cpp
|
|
|
|
../../src/tabbox/tabbox_logging.cpp
|
|
|
|
../../src/tabbox/tabboxconfig.cpp
|
|
|
|
../../src/tabbox/tabboxhandler.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
mock_tabboxclient.cpp
|
|
|
|
mock_tabboxhandler.cpp
|
|
|
|
test_tabbox_clientmodel.cpp
|
2012-07-21 09:25:17 +00:00
|
|
|
)
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testTabBoxClientModel ${testTabBoxClientModel_SRCS})
|
2017-07-29 16:47:58 +00:00
|
|
|
set_target_properties(testTabBoxClientModel PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testTabBoxClientModel
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Core
|
|
|
|
Qt::DBus
|
|
|
|
Qt::Quick
|
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2021-02-09 18:59:51 +00:00
|
|
|
Qt::GuiPrivate
|
2019-09-18 10:31:02 +00:00
|
|
|
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::I18n
|
|
|
|
KF5::Package
|
|
|
|
KF5::WindowSystem
|
|
|
|
|
2014-06-10 09:14:59 +00:00
|
|
|
XCB::XCB
|
|
|
|
)
|
2022-03-09 16:25:44 +00:00
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
target_link_libraries(testTabBoxClientModel Qt::X11Extras)
|
|
|
|
endif()
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testTabBoxClientModel COMMAND testTabBoxClientModel)
|
2014-06-10 09:14:59 +00:00
|
|
|
ecm_mark_as_test(testTabBoxClientModel)
|
2012-08-08 20:28:22 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test TabBox::TabBoxHandler
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testTabBoxHandler_SRCS
|
2021-02-09 19:31:40 +00:00
|
|
|
../../src/tabbox/clientmodel.cpp
|
|
|
|
../../src/tabbox/desktopmodel.cpp
|
|
|
|
../../src/tabbox/tabbox_logging.cpp
|
|
|
|
../../src/tabbox/tabboxconfig.cpp
|
|
|
|
../../src/tabbox/tabboxhandler.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
mock_tabboxclient.cpp
|
|
|
|
mock_tabboxhandler.cpp
|
|
|
|
test_tabbox_handler.cpp
|
2012-08-08 20:28:22 +00:00
|
|
|
)
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testTabBoxHandler ${testTabBoxHandler_SRCS})
|
2017-07-29 16:47:58 +00:00
|
|
|
set_target_properties(testTabBoxHandler PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testTabBoxHandler
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Core
|
|
|
|
Qt::DBus
|
|
|
|
Qt::Quick
|
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2021-02-09 18:59:51 +00:00
|
|
|
Qt::GuiPrivate
|
2019-09-18 10:31:02 +00:00
|
|
|
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::I18n
|
|
|
|
KF5::Package
|
|
|
|
KF5::WindowSystem
|
|
|
|
|
2014-06-10 09:14:59 +00:00
|
|
|
XCB::XCB
|
|
|
|
)
|
2022-03-09 16:25:44 +00:00
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
target_link_libraries(testTabBoxHandler Qt::X11Extras)
|
|
|
|
endif()
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testTabBoxHandler COMMAND testTabBoxHandler)
|
2014-06-10 09:14:59 +00:00
|
|
|
ecm_mark_as_test(testTabBoxHandler)
|
2012-08-15 18:53:05 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test TabBox::TabBoxConfig
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testTabBoxConfig_SRCS
|
2021-02-09 19:31:40 +00:00
|
|
|
../../src/tabbox/tabbox_logging.cpp
|
|
|
|
../../src/tabbox/tabboxconfig.cpp
|
2012-08-15 18:53:05 +00:00
|
|
|
test_tabbox_config.cpp
|
|
|
|
)
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testTabBoxConfig ${testTabBoxConfig_SRCS})
|
2021-01-30 16:18:21 +00:00
|
|
|
target_link_libraries(testTabBoxConfig Qt::Core Qt::Test)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testTabBoxConfig COMMAND testTabBoxConfig)
|
2014-03-18 10:49:53 +00:00
|
|
|
ecm_mark_as_test(testTabBoxConfig)
|
2012-11-17 10:50:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test TabBox::DesktopChainManager
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testDesktopChain_SRCS
|
2021-02-09 19:31:40 +00:00
|
|
|
../../src/tabbox/desktopchain.cpp
|
|
|
|
../../src/tabbox/tabbox_logging.cpp
|
2012-11-17 10:50:59 +00:00
|
|
|
test_desktopchain.cpp
|
|
|
|
)
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testDesktopChain ${testDesktopChain_SRCS})
|
2021-01-30 16:18:21 +00:00
|
|
|
target_link_libraries(testDesktopChain Qt::Core Qt::Test)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testDesktopChain COMMAND testDesktopChain)
|
2014-03-18 10:49:53 +00:00
|
|
|
ecm_mark_as_test(testDesktopChain)
|