kwin/autotests/libinput/CMakeLists.txt
Martin Gräßlin ac227e57c7 [autotest/libinput] Add a mocked test for Libinput::KeyEvent
This new test includes everything used in events.cpp to the mocked
functionality of libinput. Only key event is implemented so far, the
referenced pointer and touch functions are mocked with default values.

The test verifies that a KeyEvent gets created and the key press/release
works as expected.
2016-05-30 17:46:53 +02:00

31 lines
1.4 KiB
CMake

########################################################
# Test Devices
########################################################
set( testLibinputDevice_SRCS device_test.cpp mock_libinput.cpp ../../libinput/device.cpp )
add_executable(testLibinputDevice ${testLibinputDevice_SRCS})
target_link_libraries( testLibinputDevice Qt5::Test)
add_test(kwin-testLibinputDevice testLibinputDevice)
ecm_mark_as_test(testLibinputDevice)
########################################################
# Test Key Event
########################################################
set( testLibinputKeyEvent_SRCS
key_event_test.cpp
mock_libinput.cpp
../../libinput/device.cpp
../../libinput/events.cpp
)
add_executable(testLibinputKeyEvent ${testLibinputKeyEvent_SRCS})
target_link_libraries( testLibinputKeyEvent Qt5::Test Qt5::Widgets KF5::ConfigCore)
add_test(kwin-testLibinputKeyEvent testLibinputKeyEvent)
ecm_mark_as_test(testLibinputKeyEvent)
########################################################
# Test Input Events
########################################################
set( testInputEvents_SRCS input_event_test.cpp mock_libinput.cpp ../../libinput/device.cpp ../../input_event.cpp )
add_executable(testInputEvents ${testInputEvents_SRCS})
target_link_libraries( testInputEvents Qt5::Test Qt5::Gui)
add_test(kwin-testInputEvents testInputEvents)
ecm_mark_as_test(testInputEvents)