Commit 575aa2f8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use macro

parent 0a7a6c33
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
ecm_add_tests(textgotolinewidgettest.cpp
NAME_PREFIX "kpimtextedit-plaintext-"
LINK_LIBRARIES KF5::PimTextEdit Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Widgets
)
ecm_add_tests(textfindwidgettest.cpp
NAME_PREFIX "kpimtextedit-plaintext-"
LINK_LIBRARIES KF5::PimTextEdit Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Widgets
)
macro(add_kpimtextedit_commonwidget_unittest _source)
get_filename_component(_name ${_source} NAME_WE)
ecm_add_test(${_source} ${_name}.h TEST_NAME ${_name}
NAME_PREFIX "kpimtextedit-plaintext-"
LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5::PimTextEdit Qt${QT_MAJOR_VERSION}::Widgets
)
endmacro()
ecm_add_tests(textreplacewidgettest.cpp
NAME_PREFIX "kpimtextedit-plaintext-"
LINK_LIBRARIES KF5::PimTextEdit Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Widgets
)
add_kpimtextedit_commonwidget_unittest(textgotolinewidgettest.cpp)
add_kpimtextedit_commonwidget_unittest(textfindwidgettest.cpp)
add_kpimtextedit_commonwidget_unittest(textreplacewidgettest.cpp)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment