mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 12:19:03 +03:00
6da96cd026
This is just a port to QtTest, I did not change the layout of the test. I did search and replace to replace the assert with QCOMPARE/QVERIFY I still call setup and setup_init like before (only explicitly, now) Also ported the preformence tests to QBENCHMAK because windows don't have gettimeofday. Relates #6358
30 lines
899 B
CMake
30 lines
899 B
CMake
project(tests)
|
|
|
|
set(TORTURE_LIBRARY torture)
|
|
|
|
include_directories(
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_BINARY_DIR}
|
|
${CMOCKA_INCLUDE_DIR}
|
|
)
|
|
|
|
include_directories(${CHECK_INCLUDE_DIRS})
|
|
# create test library
|
|
add_library(${TORTURE_LIBRARY} STATIC torture.c cmdline.c)
|
|
target_link_libraries(${TORTURE_LIBRARY} ${CMOCKA_LIBRARIES})
|
|
|
|
set(TEST_TARGET_LIBRARIES ${TORTURE_LIBRARY} Qt5::Core "${csync_NAME}")
|
|
|
|
# create tests
|
|
|
|
# std
|
|
add_cmocka_test(check_std_c_alloc std_tests/check_std_c_alloc.c ${TEST_TARGET_LIBRARIES})
|
|
add_cmocka_test(check_std_c_jhash std_tests/check_std_c_jhash.c ${TEST_TARGET_LIBRARIES})
|
|
add_cmocka_test(check_std_c_str std_tests/check_std_c_str.c ${TEST_TARGET_LIBRARIES})
|
|
|
|
# vio
|
|
add_cmocka_test(check_vio_ext vio_tests/check_vio_ext.cpp ${TEST_TARGET_LIBRARIES})
|
|
|
|
# encoding
|
|
add_cmocka_test(check_encoding_functions encoding_tests/check_encoding.cpp ${TEST_TARGET_LIBRARIES})
|
|
|