diff --git a/cmake/QtPromiseAddTest.cmake b/cmake/QtPromiseAddTest.cmake index 737e984..3fc969b 100644 --- a/cmake/QtPromiseAddTest.cmake +++ b/cmake/QtPromiseAddTest.cmake @@ -17,6 +17,7 @@ function(qtpromise_add_test NAME) endif() target_link_libraries(${_TARGET} + Qt5::Concurrent Qt5::Test qtpromise qtpromise.tests.utils @@ -28,3 +29,16 @@ function(qtpromise_add_test NAME) WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) endfunction() + +function(qtpromise_add_tests GROUP) + cmake_parse_arguments(_ARG "" "" "SOURCES" ${ARGN}) + + foreach(_FILE ${_ARG_SOURCES}) + get_filename_component(_FILE_NAME ${_FILE} NAME) + if (_FILE_NAME MATCHES "^tst_(.+)\.cpp$") + string(REGEX REPLACE "^tst_(.+)\.cpp$" "\\1" _TEST_NAME ${_FILE_NAME}) + qtpromise_add_test(${GROUP}.${_TEST_NAME} SOURCES ${_FILE} ${_ARG_UNPARSED_ARGUMENTS}) + endif() + endforeach() +endfunction() + diff --git a/tests/auto/qtpromise/deprecations/CMakeLists.txt b/tests/auto/qtpromise/deprecations/CMakeLists.txt index 095aebc..381ea2c 100644 --- a/tests/auto/qtpromise/deprecations/CMakeLists.txt +++ b/tests/auto/qtpromise/deprecations/CMakeLists.txt @@ -5,5 +5,9 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") add_compile_options(/wd4996) endif() -add_subdirectory(helpers) -add_subdirectory(qpromise) +qtpromise_add_tests(deprecation + SOURCES + tst_helpers_qpromise.cpp + tst_helpers_qpromiseall.cpp + tst_qpromise_all.cpp +) diff --git a/tests/auto/qtpromise/deprecations/helpers/CMakeLists.txt b/tests/auto/qtpromise/deprecations/helpers/CMakeLists.txt deleted file mode 100644 index ce53777..0000000 --- a/tests/auto/qtpromise/deprecations/helpers/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory(qpromise) -add_subdirectory(qpromiseall) diff --git a/tests/auto/qtpromise/deprecations/helpers/qpromise/CMakeLists.txt b/tests/auto/qtpromise/deprecations/helpers/qpromise/CMakeLists.txt deleted file mode 100644 index 144a480..0000000 --- a/tests/auto/qtpromise/deprecations/helpers/qpromise/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -qtpromise_add_test(deprecations.helpers.qpromise - SOURCES - tst_qpromise.cpp - LIBRARIES - Qt5::Concurrent -) diff --git a/tests/auto/qtpromise/deprecations/helpers/qpromiseall/CMakeLists.txt b/tests/auto/qtpromise/deprecations/helpers/qpromiseall/CMakeLists.txt deleted file mode 100644 index 5248863..0000000 --- a/tests/auto/qtpromise/deprecations/helpers/qpromiseall/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(deprecations.helpers.qpromiseall - SOURCES - tst_qpromiseall.cpp -) diff --git a/tests/auto/qtpromise/deprecations/qpromise/CMakeLists.txt b/tests/auto/qtpromise/deprecations/qpromise/CMakeLists.txt deleted file mode 100644 index fd51d76..0000000 --- a/tests/auto/qtpromise/deprecations/qpromise/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(all) diff --git a/tests/auto/qtpromise/deprecations/qpromise/all/CMakeLists.txt b/tests/auto/qtpromise/deprecations/qpromise/all/CMakeLists.txt deleted file mode 100644 index 276f55f..0000000 --- a/tests/auto/qtpromise/deprecations/qpromise/all/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(deprecations.qpromise.all - SOURCES - tst_all.cpp -) diff --git a/tests/auto/qtpromise/deprecations/helpers/qpromise/tst_qpromise.cpp b/tests/auto/qtpromise/deprecations/tst_helpers_qpromise.cpp similarity index 98% rename from tests/auto/qtpromise/deprecations/helpers/qpromise/tst_qpromise.cpp rename to tests/auto/qtpromise/deprecations/tst_helpers_qpromise.cpp index 01b95a0..b2b58c4 100644 --- a/tests/auto/qtpromise/deprecations/helpers/qpromise/tst_qpromise.cpp +++ b/tests/auto/qtpromise/deprecations/tst_helpers_qpromise.cpp @@ -5,8 +5,8 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../../shared/data.h" -#include "../../../shared/utils.h" +#include "../shared/data.h" +#include "../shared/utils.h" // QtPromise #include @@ -38,7 +38,7 @@ private Q_SLOTS: }; QTEST_MAIN(tst_deprecations_helpers_qpromise) -#include "tst_qpromise.moc" +#include "tst_helpers_qpromise.moc" void tst_deprecations_helpers_qpromise::value() { diff --git a/tests/auto/qtpromise/deprecations/helpers/qpromiseall/tst_qpromiseall.cpp b/tests/auto/qtpromise/deprecations/tst_helpers_qpromiseall.cpp similarity index 99% rename from tests/auto/qtpromise/deprecations/helpers/qpromiseall/tst_qpromiseall.cpp rename to tests/auto/qtpromise/deprecations/tst_helpers_qpromiseall.cpp index 66dc915..8980ee1 100644 --- a/tests/auto/qtpromise/deprecations/helpers/qpromiseall/tst_qpromiseall.cpp +++ b/tests/auto/qtpromise/deprecations/tst_helpers_qpromiseall.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include @@ -32,7 +32,7 @@ private Q_SLOTS: }; QTEST_MAIN(tst_deprecations_helpers_qpromiseall) -#include "tst_qpromiseall.moc" +#include "tst_helpers_qpromiseall.moc" namespace { diff --git a/tests/auto/qtpromise/deprecations/qpromise/all/tst_all.cpp b/tests/auto/qtpromise/deprecations/tst_qpromise_all.cpp similarity index 99% rename from tests/auto/qtpromise/deprecations/qpromise/all/tst_all.cpp rename to tests/auto/qtpromise/deprecations/tst_qpromise_all.cpp index 91935a1..1d8bf9c 100644 --- a/tests/auto/qtpromise/deprecations/qpromise/all/tst_all.cpp +++ b/tests/auto/qtpromise/deprecations/tst_qpromise_all.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include @@ -32,7 +32,7 @@ private Q_SLOTS: }; QTEST_MAIN(tst_deprecations_qpromise_all) -#include "tst_all.moc" +#include "tst_qpromise_all.moc" namespace { diff --git a/tests/auto/qtpromise/exceptions/CMakeLists.txt b/tests/auto/qtpromise/exceptions/CMakeLists.txt index 47eb69d..d41758a 100644 --- a/tests/auto/qtpromise/exceptions/CMakeLists.txt +++ b/tests/auto/qtpromise/exceptions/CMakeLists.txt @@ -1,6 +1,4 @@ qtpromise_add_test(exceptions SOURCES tst_exceptions.cpp - LIBRARIES - Qt5::Concurrent ) diff --git a/tests/auto/qtpromise/future/CMakeLists.txt b/tests/auto/qtpromise/future/CMakeLists.txt index 861b9e5..e7f20b5 100644 --- a/tests/auto/qtpromise/future/CMakeLists.txt +++ b/tests/auto/qtpromise/future/CMakeLists.txt @@ -1,6 +1,4 @@ qtpromise_add_test(future SOURCES tst_future.cpp - LIBRARIES - Qt5::Concurrent ) diff --git a/tests/auto/qtpromise/helpers/CMakeLists.txt b/tests/auto/qtpromise/helpers/CMakeLists.txt index 0c91913..5cae2df 100644 --- a/tests/auto/qtpromise/helpers/CMakeLists.txt +++ b/tests/auto/qtpromise/helpers/CMakeLists.txt @@ -1,9 +1,12 @@ -add_subdirectory(all) -add_subdirectory(attempt) -add_subdirectory(connect) -add_subdirectory(each) -add_subdirectory(filter) -add_subdirectory(map) -add_subdirectory(reduce) -add_subdirectory(reject) -add_subdirectory(resolve) +qtpromise_add_tests(helpers + SOURCES + tst_all.cpp + tst_attempt.cpp + tst_connect.cpp + tst_each.cpp + tst_filter.cpp + tst_map.cpp + tst_reduce.cpp + tst_reject.cpp + tst_resolve.cpp +) diff --git a/tests/auto/qtpromise/helpers/all/CMakeLists.txt b/tests/auto/qtpromise/helpers/all/CMakeLists.txt deleted file mode 100644 index 47fc9bb..0000000 --- a/tests/auto/qtpromise/helpers/all/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(helpers.all - SOURCES - tst_all.cpp -) diff --git a/tests/auto/qtpromise/helpers/attempt/CMakeLists.txt b/tests/auto/qtpromise/helpers/attempt/CMakeLists.txt deleted file mode 100644 index 61b27ac..0000000 --- a/tests/auto/qtpromise/helpers/attempt/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -qtpromise_add_test(helpers.attempt - SOURCES - tst_attempt.cpp - LIBRARIES - Qt5::Concurrent -) diff --git a/tests/auto/qtpromise/helpers/connect/CMakeLists.txt b/tests/auto/qtpromise/helpers/connect/CMakeLists.txt deleted file mode 100644 index b87bed3..0000000 --- a/tests/auto/qtpromise/helpers/connect/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(helpers.connect - SOURCES - tst_connect.cpp -) diff --git a/tests/auto/qtpromise/helpers/each/CMakeLists.txt b/tests/auto/qtpromise/helpers/each/CMakeLists.txt deleted file mode 100644 index 07f87e1..0000000 --- a/tests/auto/qtpromise/helpers/each/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(helpers.each - SOURCES - tst_each.cpp -) diff --git a/tests/auto/qtpromise/helpers/filter/CMakeLists.txt b/tests/auto/qtpromise/helpers/filter/CMakeLists.txt deleted file mode 100644 index bdf7f5b..0000000 --- a/tests/auto/qtpromise/helpers/filter/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(helpers.filter - SOURCES - tst_filter.cpp -) diff --git a/tests/auto/qtpromise/helpers/map/CMakeLists.txt b/tests/auto/qtpromise/helpers/map/CMakeLists.txt deleted file mode 100644 index 11450e3..0000000 --- a/tests/auto/qtpromise/helpers/map/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(helpers.map - SOURCES - tst_map.cpp -) diff --git a/tests/auto/qtpromise/helpers/reduce/CMakeLists.txt b/tests/auto/qtpromise/helpers/reduce/CMakeLists.txt deleted file mode 100644 index 9e635e1..0000000 --- a/tests/auto/qtpromise/helpers/reduce/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(helpers.reduce - SOURCES - tst_reduce.cpp -) diff --git a/tests/auto/qtpromise/helpers/reject/CMakeLists.txt b/tests/auto/qtpromise/helpers/reject/CMakeLists.txt deleted file mode 100644 index 5df28dc..0000000 --- a/tests/auto/qtpromise/helpers/reject/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(helpers.reject - SOURCES - tst_reject.cpp -) diff --git a/tests/auto/qtpromise/helpers/resolve/CMakeLists.txt b/tests/auto/qtpromise/helpers/resolve/CMakeLists.txt deleted file mode 100644 index 582b86b..0000000 --- a/tests/auto/qtpromise/helpers/resolve/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -qtpromise_add_test(helpers.resolve - SOURCES - tst_resolve.cpp - LIBRARIES - Qt5::Concurrent -) diff --git a/tests/auto/qtpromise/helpers/all/tst_all.cpp b/tests/auto/qtpromise/helpers/tst_all.cpp similarity index 99% rename from tests/auto/qtpromise/helpers/all/tst_all.cpp rename to tests/auto/qtpromise/helpers/tst_all.cpp index cbeda8a..d09f759 100644 --- a/tests/auto/qtpromise/helpers/all/tst_all.cpp +++ b/tests/auto/qtpromise/helpers/tst_all.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/helpers/attempt/tst_attempt.cpp b/tests/auto/qtpromise/helpers/tst_attempt.cpp similarity index 98% rename from tests/auto/qtpromise/helpers/attempt/tst_attempt.cpp rename to tests/auto/qtpromise/helpers/tst_attempt.cpp index 8fdc993..7915bf8 100644 --- a/tests/auto/qtpromise/helpers/attempt/tst_attempt.cpp +++ b/tests/auto/qtpromise/helpers/tst_attempt.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/helpers/connect/tst_connect.cpp b/tests/auto/qtpromise/helpers/tst_connect.cpp similarity index 99% rename from tests/auto/qtpromise/helpers/connect/tst_connect.cpp rename to tests/auto/qtpromise/helpers/tst_connect.cpp index 90d9025..654e584 100644 --- a/tests/auto/qtpromise/helpers/connect/tst_connect.cpp +++ b/tests/auto/qtpromise/helpers/tst_connect.cpp @@ -5,8 +5,8 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/object.h" -#include "../../shared/utils.h" +#include "../shared/object.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/helpers/each/tst_each.cpp b/tests/auto/qtpromise/helpers/tst_each.cpp similarity index 99% rename from tests/auto/qtpromise/helpers/each/tst_each.cpp rename to tests/auto/qtpromise/helpers/tst_each.cpp index 7920304..db9f540 100644 --- a/tests/auto/qtpromise/helpers/each/tst_each.cpp +++ b/tests/auto/qtpromise/helpers/tst_each.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/helpers/filter/tst_filter.cpp b/tests/auto/qtpromise/helpers/tst_filter.cpp similarity index 98% rename from tests/auto/qtpromise/helpers/filter/tst_filter.cpp rename to tests/auto/qtpromise/helpers/tst_filter.cpp index 46e995a..79dc83c 100644 --- a/tests/auto/qtpromise/helpers/filter/tst_filter.cpp +++ b/tests/auto/qtpromise/helpers/tst_filter.cpp @@ -5,12 +5,13 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include // Qt +#include #include using namespace QtPromise; @@ -52,8 +53,6 @@ struct SequenceTester } // anonymous namespace -#include - void tst_helpers_filter::emptySequence() { auto p = QtPromise::filter(QVector{}, [](int v, ...) { diff --git a/tests/auto/qtpromise/helpers/map/tst_map.cpp b/tests/auto/qtpromise/helpers/tst_map.cpp similarity index 99% rename from tests/auto/qtpromise/helpers/map/tst_map.cpp rename to tests/auto/qtpromise/helpers/tst_map.cpp index 8b04358..b8e9b14 100644 --- a/tests/auto/qtpromise/helpers/map/tst_map.cpp +++ b/tests/auto/qtpromise/helpers/tst_map.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/helpers/reduce/tst_reduce.cpp b/tests/auto/qtpromise/helpers/tst_reduce.cpp similarity index 99% rename from tests/auto/qtpromise/helpers/reduce/tst_reduce.cpp rename to tests/auto/qtpromise/helpers/tst_reduce.cpp index dc9e926..31c72f5 100644 --- a/tests/auto/qtpromise/helpers/reduce/tst_reduce.cpp +++ b/tests/auto/qtpromise/helpers/tst_reduce.cpp @@ -5,8 +5,8 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/data.h" -#include "../../shared/utils.h" +#include "../shared/data.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/helpers/reject/tst_reject.cpp b/tests/auto/qtpromise/helpers/tst_reject.cpp similarity index 98% rename from tests/auto/qtpromise/helpers/reject/tst_reject.cpp rename to tests/auto/qtpromise/helpers/tst_reject.cpp index b6c252c..63a2e69 100644 --- a/tests/auto/qtpromise/helpers/reject/tst_reject.cpp +++ b/tests/auto/qtpromise/helpers/tst_reject.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/helpers/resolve/tst_resolve.cpp b/tests/auto/qtpromise/helpers/tst_resolve.cpp similarity index 99% rename from tests/auto/qtpromise/helpers/resolve/tst_resolve.cpp rename to tests/auto/qtpromise/helpers/tst_resolve.cpp index 5a56e83..18fbb15 100644 --- a/tests/auto/qtpromise/helpers/resolve/tst_resolve.cpp +++ b/tests/auto/qtpromise/helpers/tst_resolve.cpp @@ -5,8 +5,8 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/data.h" -#include "../../shared/utils.h" +#include "../shared/data.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/CMakeLists.txt b/tests/auto/qtpromise/qpromise/CMakeLists.txt index 6a8779a..f30b65e 100644 --- a/tests/auto/qtpromise/qpromise/CMakeLists.txt +++ b/tests/auto/qtpromise/qpromise/CMakeLists.txt @@ -1,14 +1,17 @@ -add_subdirectory(construct) -add_subdirectory(delay) -add_subdirectory(each) -add_subdirectory(fail) -add_subdirectory(filter) -add_subdirectory(finally) -add_subdirectory(map) -add_subdirectory(operators) -add_subdirectory(reduce) -add_subdirectory(resolve) -add_subdirectory(tap) -add_subdirectory(tapfail) -add_subdirectory(then) -add_subdirectory(timeout) +qtpromise_add_tests(qpromise + SOURCES + tst_construct.cpp + tst_delay.cpp + tst_each.cpp + tst_fail.cpp + tst_filter.cpp + tst_finally.cpp + tst_map.cpp + tst_operators.cpp + tst_reduce.cpp + tst_resolve.cpp + tst_tap.cpp + tst_tapfail.cpp + tst_then.cpp + tst_timeout.cpp +) diff --git a/tests/auto/qtpromise/qpromise/construct/CMakeLists.txt b/tests/auto/qtpromise/qpromise/construct/CMakeLists.txt deleted file mode 100644 index 7f0e105..0000000 --- a/tests/auto/qtpromise/qpromise/construct/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.construct - SOURCES - tst_construct.cpp -) diff --git a/tests/auto/qtpromise/qpromise/delay/CMakeLists.txt b/tests/auto/qtpromise/qpromise/delay/CMakeLists.txt deleted file mode 100644 index bb4a3fa..0000000 --- a/tests/auto/qtpromise/qpromise/delay/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.delay - SOURCES - tst_delay.cpp -) diff --git a/tests/auto/qtpromise/qpromise/each/CMakeLists.txt b/tests/auto/qtpromise/qpromise/each/CMakeLists.txt deleted file mode 100644 index 3e7468f..0000000 --- a/tests/auto/qtpromise/qpromise/each/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.each - SOURCES - tst_each.cpp -) diff --git a/tests/auto/qtpromise/qpromise/fail/CMakeLists.txt b/tests/auto/qtpromise/qpromise/fail/CMakeLists.txt deleted file mode 100644 index 28b885a..0000000 --- a/tests/auto/qtpromise/qpromise/fail/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.fail - SOURCES - tst_fail.cpp -) diff --git a/tests/auto/qtpromise/qpromise/filter/CMakeLists.txt b/tests/auto/qtpromise/qpromise/filter/CMakeLists.txt deleted file mode 100644 index 084ef1c..0000000 --- a/tests/auto/qtpromise/qpromise/filter/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.filter - SOURCES - tst_filter.cpp -) diff --git a/tests/auto/qtpromise/qpromise/finally/CMakeLists.txt b/tests/auto/qtpromise/qpromise/finally/CMakeLists.txt deleted file mode 100644 index 3d1e7b1..0000000 --- a/tests/auto/qtpromise/qpromise/finally/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.finally - SOURCES - tst_finally.cpp -) diff --git a/tests/auto/qtpromise/qpromise/map/CMakeLists.txt b/tests/auto/qtpromise/qpromise/map/CMakeLists.txt deleted file mode 100644 index 34bdc53..0000000 --- a/tests/auto/qtpromise/qpromise/map/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.map - SOURCES - tst_map.cpp -) diff --git a/tests/auto/qtpromise/qpromise/operators/CMakeLists.txt b/tests/auto/qtpromise/qpromise/operators/CMakeLists.txt deleted file mode 100644 index 401f4c0..0000000 --- a/tests/auto/qtpromise/qpromise/operators/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.operators - SOURCES - tst_operators.cpp -) diff --git a/tests/auto/qtpromise/qpromise/reduce/CMakeLists.txt b/tests/auto/qtpromise/qpromise/reduce/CMakeLists.txt deleted file mode 100644 index e26fd50..0000000 --- a/tests/auto/qtpromise/qpromise/reduce/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.reduce - SOURCES - tst_reduce.cpp -) diff --git a/tests/auto/qtpromise/qpromise/resolve/CMakeLists.txt b/tests/auto/qtpromise/qpromise/resolve/CMakeLists.txt deleted file mode 100644 index d3f43b7..0000000 --- a/tests/auto/qtpromise/qpromise/resolve/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.resolve - SOURCES - tst_resolve.cpp -) diff --git a/tests/auto/qtpromise/qpromise/tap/CMakeLists.txt b/tests/auto/qtpromise/qpromise/tap/CMakeLists.txt deleted file mode 100644 index 509167e..0000000 --- a/tests/auto/qtpromise/qpromise/tap/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.tap - SOURCES - tst_tap.cpp -) diff --git a/tests/auto/qtpromise/qpromise/tapfail/CMakeLists.txt b/tests/auto/qtpromise/qpromise/tapfail/CMakeLists.txt deleted file mode 100644 index d5a45b9..0000000 --- a/tests/auto/qtpromise/qpromise/tapfail/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.tapfail - SOURCES - tst_tapfail.cpp -) diff --git a/tests/auto/qtpromise/qpromise/then/CMakeLists.txt b/tests/auto/qtpromise/qpromise/then/CMakeLists.txt deleted file mode 100644 index 26d1331..0000000 --- a/tests/auto/qtpromise/qpromise/then/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.then - SOURCES - tst_then.cpp -) diff --git a/tests/auto/qtpromise/qpromise/timeout/CMakeLists.txt b/tests/auto/qtpromise/qpromise/timeout/CMakeLists.txt deleted file mode 100644 index 4ea1258..0000000 --- a/tests/auto/qtpromise/qpromise/timeout/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -qtpromise_add_test(qpromise.timeout - SOURCES - tst_timeout.cpp -) diff --git a/tests/auto/qtpromise/qpromise/construct/tst_construct.cpp b/tests/auto/qtpromise/qpromise/tst_construct.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/construct/tst_construct.cpp rename to tests/auto/qtpromise/qpromise/tst_construct.cpp index c1686f7..34d1380 100644 --- a/tests/auto/qtpromise/qpromise/construct/tst_construct.cpp +++ b/tests/auto/qtpromise/qpromise/tst_construct.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/delay/tst_delay.cpp b/tests/auto/qtpromise/qpromise/tst_delay.cpp similarity index 98% rename from tests/auto/qtpromise/qpromise/delay/tst_delay.cpp rename to tests/auto/qtpromise/qpromise/tst_delay.cpp index 85c427c..2b2abe7 100644 --- a/tests/auto/qtpromise/qpromise/delay/tst_delay.cpp +++ b/tests/auto/qtpromise/qpromise/tst_delay.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/each/tst_each.cpp b/tests/auto/qtpromise/qpromise/tst_each.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/each/tst_each.cpp rename to tests/auto/qtpromise/qpromise/tst_each.cpp index b035365..50de043 100644 --- a/tests/auto/qtpromise/qpromise/each/tst_each.cpp +++ b/tests/auto/qtpromise/qpromise/tst_each.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/fail/tst_fail.cpp b/tests/auto/qtpromise/qpromise/tst_fail.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/fail/tst_fail.cpp rename to tests/auto/qtpromise/qpromise/tst_fail.cpp index a77aabc..e0d852b 100644 --- a/tests/auto/qtpromise/qpromise/fail/tst_fail.cpp +++ b/tests/auto/qtpromise/qpromise/tst_fail.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/filter/tst_filter.cpp b/tests/auto/qtpromise/qpromise/tst_filter.cpp similarity index 98% rename from tests/auto/qtpromise/qpromise/filter/tst_filter.cpp rename to tests/auto/qtpromise/qpromise/tst_filter.cpp index b5e27af..76bbd6f 100644 --- a/tests/auto/qtpromise/qpromise/filter/tst_filter.cpp +++ b/tests/auto/qtpromise/qpromise/tst_filter.cpp @@ -5,12 +5,13 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include // Qt +#include #include using namespace QtPromise; @@ -57,8 +58,6 @@ struct SequenceTester } // anonymous namespace -#include - void tst_qpromise_filter::emptySequence() { auto p = QPromise>::resolve({}).filter([](int v, ...) { diff --git a/tests/auto/qtpromise/qpromise/finally/tst_finally.cpp b/tests/auto/qtpromise/qpromise/tst_finally.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/finally/tst_finally.cpp rename to tests/auto/qtpromise/qpromise/tst_finally.cpp index 01f3635..0837412 100644 --- a/tests/auto/qtpromise/qpromise/finally/tst_finally.cpp +++ b/tests/auto/qtpromise/qpromise/tst_finally.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/map/tst_map.cpp b/tests/auto/qtpromise/qpromise/tst_map.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/map/tst_map.cpp rename to tests/auto/qtpromise/qpromise/tst_map.cpp index 5cea6da..55a8eb9 100644 --- a/tests/auto/qtpromise/qpromise/map/tst_map.cpp +++ b/tests/auto/qtpromise/qpromise/tst_map.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/operators/tst_operators.cpp b/tests/auto/qtpromise/qpromise/tst_operators.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/operators/tst_operators.cpp rename to tests/auto/qtpromise/qpromise/tst_operators.cpp index b1da3a4..20d21fa 100644 --- a/tests/auto/qtpromise/qpromise/operators/tst_operators.cpp +++ b/tests/auto/qtpromise/qpromise/tst_operators.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/reduce/tst_reduce.cpp b/tests/auto/qtpromise/qpromise/tst_reduce.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/reduce/tst_reduce.cpp rename to tests/auto/qtpromise/qpromise/tst_reduce.cpp index 58ecb89..cfe954e 100644 --- a/tests/auto/qtpromise/qpromise/reduce/tst_reduce.cpp +++ b/tests/auto/qtpromise/qpromise/tst_reduce.cpp @@ -5,8 +5,8 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/data.h" -#include "../../shared/utils.h" +#include "../shared/data.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/resolve/tst_resolve.cpp b/tests/auto/qtpromise/qpromise/tst_resolve.cpp similarity index 98% rename from tests/auto/qtpromise/qpromise/resolve/tst_resolve.cpp rename to tests/auto/qtpromise/qpromise/tst_resolve.cpp index 26e079f..f400cb5 100644 --- a/tests/auto/qtpromise/qpromise/resolve/tst_resolve.cpp +++ b/tests/auto/qtpromise/qpromise/tst_resolve.cpp @@ -5,8 +5,8 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/data.h" -#include "../../shared/utils.h" +#include "../shared/data.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/tap/tst_tap.cpp b/tests/auto/qtpromise/qpromise/tst_tap.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/tap/tst_tap.cpp rename to tests/auto/qtpromise/qpromise/tst_tap.cpp index ee2fff6..6b73c64 100644 --- a/tests/auto/qtpromise/qpromise/tap/tst_tap.cpp +++ b/tests/auto/qtpromise/qpromise/tst_tap.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/tapfail/tst_tapfail.cpp b/tests/auto/qtpromise/qpromise/tst_tapfail.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/tapfail/tst_tapfail.cpp rename to tests/auto/qtpromise/qpromise/tst_tapfail.cpp index 9198685..d1dce91 100644 --- a/tests/auto/qtpromise/qpromise/tapfail/tst_tapfail.cpp +++ b/tests/auto/qtpromise/qpromise/tst_tapfail.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/qpromise/then/tst_then.cpp b/tests/auto/qtpromise/qpromise/tst_then.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/then/tst_then.cpp rename to tests/auto/qtpromise/qpromise/tst_then.cpp index c4e1b0a..4fc2703 100644 --- a/tests/auto/qtpromise/qpromise/then/tst_then.cpp +++ b/tests/auto/qtpromise/qpromise/tst_then.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" #include diff --git a/tests/auto/qtpromise/qpromise/timeout/tst_timeout.cpp b/tests/auto/qtpromise/qpromise/tst_timeout.cpp similarity index 99% rename from tests/auto/qtpromise/qpromise/timeout/tst_timeout.cpp rename to tests/auto/qtpromise/qpromise/tst_timeout.cpp index f6da085..34d3c79 100644 --- a/tests/auto/qtpromise/qpromise/timeout/tst_timeout.cpp +++ b/tests/auto/qtpromise/qpromise/tst_timeout.cpp @@ -5,7 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -#include "../../shared/utils.h" +#include "../shared/utils.h" // QtPromise #include diff --git a/tests/auto/qtpromise/thread/CMakeLists.txt b/tests/auto/qtpromise/thread/CMakeLists.txt index b786cd1..0fdc93a 100644 --- a/tests/auto/qtpromise/thread/CMakeLists.txt +++ b/tests/auto/qtpromise/thread/CMakeLists.txt @@ -1,6 +1,4 @@ qtpromise_add_test(thread SOURCES tst_thread.cpp - LIBRARIES - Qt5::Concurrent )