find_package(Qt5Test CONFIG REQUIRED)
include(ECMAddTests)
+include(FindGem) # For servicemenutest, see bottom of this file
+
# KItemSetTest
ecm_add_test(kitemsettest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test)
# DolphinSearchBox
if (KF5Baloo_FOUND)
- ecm_add_test(dolphinsearchboxtest.cpp
- TEST_NAME dolphinsearchboxtest
- LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)
+ ecm_add_test(dolphinsearchboxtest.cpp
+ TEST_NAME dolphinsearchboxtest
+ LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)
+endif()
+
+# DolphinQuery
+if (KF5Baloo_FOUND)
+ ecm_add_test(dolphinquerytest.cpp
+ TEST_NAME dolphinquerytest
+ LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)
endif()
# KStandardItemModelTest
LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)
# DolphinMainWindowTest
-ecm_add_test(dolphinmainwindowtest.cpp
+set(dolphinmainwindowtest_SRCS dolphinmainwindowtest.cpp)
+qt5_add_resources(dolphinmainwindowtest_SRCS ${CMAKE_SOURCE_DIR}/src/dolphin.qrc)
+
+ecm_add_test(${dolphinmainwindowtest_SRCS}
TEST_NAME dolphinmainwindowtest
LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)
-ecm_add_test(draganddrophelpertest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test)
\ No newline at end of file
+# DragAndDropHelperTest
+ecm_add_test(draganddrophelpertest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test)
+
+# PlacesItemModelTest
+ecm_add_test(placesitemmodeltest.cpp
+TEST_NAME placesitemmodeltest
+LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)
+
+find_gem(test-unit)
+set_package_properties(Gem:test-unit PROPERTIES
+ TYPE RECOMMENDED
+ DESCRIPTION "Ruby gem 'test-unit' required for testing of servicemenu helpers.")
+if (Gem:test-unit_FOUND)
+ add_test(NAME servicemenutest
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../settings/contextmenu/test/test_run.rb)
+endif()