Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@ rapids_cpm_init(OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/versions.json)

if (STDEXEC_BUILD_TESTS)
# Add Catch2
set(Catch2_VERSION 2.13.6)
set(Catch2_VERSION 3.14.0)
# Always download it, don't attempt to do `find_package(Catch2)` first
set(CPM_DOWNLOAD_Catch2 TRUE)
rapids_cpm_find(Catch2 ${Catch2_VERSION}
GLOBAL_TARGETS Catch2::Catch2
GLOBAL_TARGETS Catch2::Catch2WithMain
BUILD_EXPORT_SET stdexec-exports
CPM_ARGS
URL https://github.com/catchorg/Catch2/archive/refs/tags/v${Catch2_VERSION}.zip
OPTIONS "CMAKE_CXX_STANDARD 20"
)
endif()

Expand Down
13 changes: 8 additions & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ set_target_properties(common_test_settings PROPERTIES
MSVC_DEBUG_INFORMATION_FORMAT Embedded
)
target_include_directories(common_test_settings INTERFACE "${CMAKE_CURRENT_LIST_DIR}")
target_compile_definitions(common_test_settings INTERFACE STDEXEC_NAMESPACE=std::execution)
target_compile_definitions(common_test_settings INTERFACE
STDEXEC_NAMESPACE=std::execution
$<$<PLATFORM_ID:Windows>:NOMINMAX>
)
target_compile_options(common_test_settings INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:/wd4714> # function marked as __forceinline not inlined
$<$<CXX_COMPILER_ID:GNU>:-Wno-maybe-uninitialized> # warnings being emitted from stdlib headers, why?
Expand All @@ -108,7 +111,7 @@ target_link_libraries(test.stdexec
PUBLIC
STDEXEC::stdexec
stdexec_executable_flags
Catch2::Catch2
Catch2::Catch2WithMain
PRIVATE
common_test_settings)

Expand All @@ -122,7 +125,7 @@ if(STDEXEC_BUILD_PARALLEL_SCHEDULER)
STDEXEC::stdexec
STDEXEC::parallel_scheduler
stdexec_executable_flags
Catch2::Catch2
Catch2::Catch2WithMain
PRIVATE
common_test_settings)
endif()
Expand All @@ -134,12 +137,12 @@ target_link_libraries(test.scratch
STDEXEC::stdexec
$<TARGET_NAME_IF_EXISTS:STDEXEC::tbbexec>
stdexec_executable_flags
Catch2::Catch2
Catch2::Catch2WithMain
PRIVATE
common_test_settings)

# Discover the Catch2 test built by the application
include(${Catch2_SOURCE_DIR}/contrib/Catch.cmake)
include(${Catch2_SOURCE_DIR}/extras/Catch.cmake)

# For testing that builds fail as expected
include(${icm_SOURCE_DIR}/icm_build_failure_testing.cmake)
Expand Down
2 changes: 1 addition & 1 deletion test/exec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ target_link_libraries(test.exec
PUBLIC
STDEXEC::stdexec
stdexec_executable_flags
Catch2::Catch2
Catch2::Catch2WithMain
PRIVATE
common_test_settings)

Expand Down
2 changes: 1 addition & 1 deletion test/exec/asio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ target_link_libraries(test.asioexec
STDEXEC::stdexec
$<TARGET_NAME_IF_EXISTS:STDEXEC::asioexec>
stdexec_executable_flags
Catch2::Catch2
Catch2::Catch2WithMain
PRIVATE
common_test_settings)

Expand Down
2 changes: 1 addition & 1 deletion test/exec/asio/test_asio_thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <numeric>
#include <span>
Expand Down
4 changes: 2 additions & 2 deletions test/exec/asio/test_completion_token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <exec/asio/asio_config.hpp>
#include <exec/asio/completion_token.hpp>

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <barrier>
#include <concepts>
Expand Down Expand Up @@ -391,7 +391,7 @@ namespace
"completion handler's lifetime (this is necessary in situations where "
"asynchronous control flow bifurcates and one of the child operations ends "
"via exception)",
"[asioexec][completion_token]")
"[asioexec][completion_token][!mayfail]")
{
std::exception_ptr ex;
std::shared_ptr<void> ptr;
Expand Down
2 changes: 1 addition & 1 deletion test/exec/asio/test_use_sender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <test_common/receivers.hpp>
#include <test_common/type_helpers.hpp>

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <chrono>
#include <exception>
Expand Down
2 changes: 1 addition & 1 deletion test/exec/async_scope/test_dtor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "exec/static_thread_pool.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <exec/async_scope.hpp>

namespace ex = STDEXEC;
Expand Down
2 changes: 1 addition & 1 deletion test/exec/async_scope/test_empty.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "test_common/receivers.hpp"
#include "test_common/schedulers.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <exec/async_scope.hpp>

namespace ex = STDEXEC;
Expand Down
2 changes: 1 addition & 1 deletion test/exec/async_scope/test_spawn.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_common/receivers.hpp"
#include "test_common/schedulers.hpp"
#include "test_common/type_helpers.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <exec/async_scope.hpp>

namespace ex = STDEXEC;
Expand Down
2 changes: 1 addition & 1 deletion test/exec/async_scope/test_spawn_future.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "test_common/receivers.hpp"
#include "test_common/schedulers.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <exec/async_scope.hpp>
#include <exec/just_from.hpp>
#include <exec/static_thread_pool.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/exec/async_scope/test_start_now.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <exec/async_scope.hpp>
#include <exec/start_now.hpp>
#include <exec/static_thread_pool.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/exec/async_scope/test_stop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "exec/start_detached.hpp"
#include "test_common/receivers.hpp"
#include "test_common/schedulers.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <exec/async_scope.hpp>

namespace ex = STDEXEC;
Expand Down
2 changes: 1 addition & 1 deletion test/exec/sequence/test_any_sequence_of.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "exec/sequence/any_sequence_of.hpp"
#include "exec/sequence/empty_sequence.hpp"

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

STDEXEC_PRAGMA_PUSH()
STDEXEC_PRAGMA_IGNORE_GNU("-Wunused-function")
Expand Down
2 changes: 1 addition & 1 deletion test/exec/sequence/test_empty_sequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "exec/sequence/empty_sequence.hpp"

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

using namespace STDEXEC;
using namespace exec;
Expand Down
2 changes: 1 addition & 1 deletion test/exec/sequence/test_ignore_all_values.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "exec/sequence/empty_sequence.hpp"
#include "exec/sequence/ignore_all_values.hpp"

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

namespace
{
Expand Down
2 changes: 1 addition & 1 deletion test/exec/sequence/test_iterate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#if !STDEXEC_NO_STDCPP_RANGES()

# include <array>
# include <catch2/catch.hpp>
# include <catch2/catch_all.hpp>
# include <numeric>

namespace
Expand Down
2 changes: 1 addition & 1 deletion test/exec/sequence/test_merge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "stdexec/__detail/__meta.hpp"
#include "stdexec/__detail/__upon_error.hpp"
#include <atomic>
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <mutex>
#include <test_common/receivers.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/exec/sequence/test_transform_each.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "exec/sequence/empty_sequence.hpp"
#include "exec/sequence/ignore_all_values.hpp"
#include "exec/sequence/iterate.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <test_common/receivers.hpp>
#include <test_common/schedulers.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/exec/taskflow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ target_link_libraries(test.taskflowexec
STDEXEC::stdexec
$<TARGET_NAME_IF_EXISTS:STDEXEC::taskflowexec>
stdexec_executable_flags
Catch2::Catch2
Catch2::Catch2WithMain
PRIVATE
common_test_settings)

Expand Down
2 changes: 1 addition & 1 deletion test/exec/taskflow/test_taskflow_thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <stdexec/execution.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/exec/tbb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ target_link_libraries(test.tbbexec
STDEXEC::stdexec
$<TARGET_NAME_IF_EXISTS:STDEXEC::tbbexec>
stdexec_executable_flags
Catch2::Catch2
Catch2::Catch2WithMain
PRIVATE
common_test_settings)

Expand Down
2 changes: 1 addition & 1 deletion test/exec/tbb/test_tbb_thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <span>

Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_any_sender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <test_common/receivers.hpp>
#include <test_common/schedulers.hpp>

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_at_coroutine_exit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <stdexec/coroutine.hpp>

#if !STDEXEC_NO_STDCPP_COROUTINES() && !STDEXEC_NO_STDCPP_EXCEPTIONS()
# include <catch2/catch.hpp>
# include <catch2/catch_all.hpp>
# include <exec/at_coroutine_exit.hpp>
# include <exec/on_coro_disposition.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_bwos_lifo_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <thread>
#include <vector>

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

TEST_CASE("exec::bwos::lifo_queue - ", "[bwos]")
{
Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_completion_signatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <test_common/receivers.hpp>
#include <test_common/schedulers.hpp>

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

using namespace STDEXEC;
using namespace exec;
Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_cpo_ensure_started.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "../stdexec/cpos/cpo_helpers.cuh"
#include "../test_common/receivers.hpp"

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

namespace
{
Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_cpo_split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "../stdexec/cpos/cpo_helpers.cuh"
#include "../test_common/receivers.hpp"

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

namespace
{
Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <exec/async_scope.hpp>
#include <exec/create.hpp>
#include <exec/static_thread_pool.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_ensure_started.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <test_common/schedulers.hpp>
#include <test_common/type_helpers.hpp>

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

namespace ex = STDEXEC;
using exec::async_scope;
Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <exec/env.hpp>
#include <stdexec/execution.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_execute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#include <atomic>
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <exec/execute.hpp>
#include <exec/static_thread_pool.hpp>
#include <stdexec/execution.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_fork_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "test_common/schedulers.hpp"
#include "test_common/type_helpers.hpp"

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <atomic>

Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_into_tuple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "test_common/senders.hpp"
#include "test_common/type_helpers.hpp"

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

using namespace STDEXEC;

Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_io_uring_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# include "exec/start_detached.hpp"
# include "exec/when_any.hpp"

# include "catch2/catch.hpp"
# include "catch2/catch_all.hpp"

using namespace STDEXEC;
using namespace exec;
Expand Down
2 changes: 1 addition & 1 deletion test/exec/test_just_from.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "test_common/tuple.hpp"
#include "test_common/type_helpers.hpp"

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

TEST_CASE("just_from is a sender", "[just_from]")
{
Expand Down
6 changes: 5 additions & 1 deletion test/exec/test_libdispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
* limitations under the License.
*/

#include "catch2/catch.hpp"
#include "catch2/catch_all.hpp"
#include "exec/libdispatch_queue.hpp"
#include "stdexec/execution.hpp"

#include <numeric>
#include <utility>
#include <vector>

namespace
{
TEST_CASE("libdispatch queue should be able to process tasks")
Expand Down
Loading
Loading