Skip to content

Commit f1181ca

Browse files
committed
renamed/relocated the tests
1 parent 9caf296 commit f1181ca

File tree

86 files changed

+218
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+218
-222
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ add_subdirectory(src/beman/execution26)
3131
if(PROJECT_IS_TOP_LEVEL)
3232
enable_testing()
3333

34-
add_subdirectory(src/beman/execution26/tests)
34+
add_subdirectory(tests/beman/execution26)
3535
add_subdirectory(examples)
3636
endif()
3737

src/beman/execution26/tests/CMakeLists.txt

Lines changed: 0 additions & 138 deletions
This file was deleted.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# src/beman/execution26/tests/CMakeLists.txt
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
cmake_minimum_required(VERSION 3.25...3.31)
4+
5+
project(beman_execution26_tests LANGUAGES CXX)
6+
7+
list(
8+
APPEND
9+
execution_tests
10+
notify.test
11+
exec-scounting.test
12+
exec-awaitable.test
13+
allocator-requirements-general.test
14+
exec-connect.test
15+
exec-continues-on.test
16+
exec-domain-default.test
17+
exec-fwd-env.test
18+
exec-general.test
19+
exec-get-allocator.test
20+
exec-get-compl-sched.test
21+
exec-get-delegation-scheduler.test
22+
exec-get-domain.test
23+
exec-get-env.test
24+
exec-get-scheduler.test
25+
exec-get-stop-token.test
26+
exec-getcomplsigs.test
27+
exec-into-variant.test
28+
exec-just.test
29+
exec-let.test
30+
exec-opstate-start.test
31+
exec-opstate.test
32+
exec-read-env.test
33+
exec-recv-concepts.test
34+
exec-recv.test
35+
exec-run-loop-general.test
36+
exec-run-loop-types.test
37+
exec-sched.test
38+
exec-schedule-from.test
39+
exec-schedule.test
40+
exec-set-error.test
41+
exec-set-stopped.test
42+
exec-set-value.test
43+
exec-snd-apply.test
44+
exec-snd-concepts.test
45+
exec-snd-expos.test
46+
exec-snd-transform.test
47+
exec-starts-on.test
48+
exec-sync-wait.test
49+
exec-then.test
50+
exec-utils-cmplsigs.test
51+
exec-when-all.test
52+
execution-queryable-concept.test
53+
execution-syn.test
54+
forward-like.test
55+
function-objects.test
56+
functional-syn.test
57+
meta-combine.test
58+
meta-contains.test
59+
meta-filter.test
60+
meta-prepend.test
61+
meta-transform.test
62+
meta-unique.test
63+
stopcallback-cons.test
64+
stopcallback-general.test
65+
stopcallback-inplace-cons.test
66+
stopcallback-inplace-general.test
67+
stopcallback-inplace.test
68+
stopcallback.test
69+
stopsource-cons.test
70+
stopsource-general.test
71+
stopsource-inplace-cons.test
72+
stopsource-inplace-general.test
73+
stopsource-inplace-mem.test
74+
stopsource-inplace.test
75+
stopsource-mem.test
76+
stopsource.test
77+
stoptoken-concepts.test
78+
stoptoken-general.test
79+
stoptoken-inplace-general.test
80+
stoptoken-inplace-members.test
81+
stoptoken-inplace.test
82+
stoptoken-mem.test
83+
stoptoken-never-general.test
84+
stoptoken-never.test
85+
stoptoken.test
86+
thread-stoptoken-intro.test
87+
thread-stoptoken-syn.compile.test
88+
thread-stoptoken.test
89+
thread.test
90+
utilities.test
91+
)
92+
93+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
94+
95+
if(PROJECT_IS_TOP_LEVEL)
96+
set(TARGET_ALIAS beman_execution26::beman_execution26)
97+
enable_testing()
98+
find_package(beman_execution26 0.0.1 EXACT QUIET)
99+
if(beman_execution26_FOUND)
100+
set(execution_tests exec-awaitable.test) # only one sample to save time! CK
101+
else()
102+
add_subdirectory(../../../.. beman_execution26)
103+
include_directories(${PROJECT_SOURCE_DIR}/include)
104+
105+
include(CMakePrintHelpers)
106+
cmake_print_variables(TARGET_ALIAS TARGET_LIBRARY TARGET_PREFIX PROJECT_SOURCE_DIR)
107+
endif()
108+
endif()
109+
110+
foreach(test ${execution_tests})
111+
set(TEST_EXE ${TARGET_PREFIX}.${test})
112+
add_executable(${TEST_EXE} ${test}.cpp)
113+
target_link_libraries(${TEST_EXE} PRIVATE ${TARGET_ALIAS})
114+
add_test(NAME ${TEST_EXE} COMMAND $<TARGET_FILE:${TEST_EXE}>)
115+
endforeach()
116+
117+
if(NOT PROJECT_IS_TOP_LEVEL)
118+
# test if the targets are findable from the build directory
119+
# cmake-format: off
120+
add_test(NAME find-package-test
121+
COMMAND ${CMAKE_CTEST_COMMAND}
122+
# --verbose
123+
--output-on-failure
124+
-C $<CONFIG>
125+
--build-and-test
126+
"${CMAKE_CURRENT_SOURCE_DIR}"
127+
"${CMAKE_CURRENT_BINARY_DIR}/find-package-test"
128+
--build-generator ${CMAKE_GENERATOR}
129+
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
130+
--build-options
131+
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
132+
"-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}"
133+
"-DCMAKE_BUILD_TYPE=$<CONFIG>"
134+
"-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}"
135+
# TODO(CK): Needed too? "--config $<CONFIG>"
136+
)
137+
# cmake-format: on
138+
endif()

src/beman/execution26/tests/allocator-requirements-general.pass.cpp renamed to tests/beman/execution26/allocator-requirements-general.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/beman/execution26/tests/allocator-requirements-general.pass.cpp -*-C++-*-
1+
// src/beman/execution26/tests/allocator-requirements-general.test.cpp -*-C++-*-
22
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

44
#include <beman/execution26/detail/simple_allocator.hpp>

src/beman/execution26/tests/exec-awaitable.pass.cpp renamed to tests/beman/execution26/exec-awaitable.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/beman/execution26/tests/exec-awaitable.pass.cpp -*-C++-*-
1+
// src/beman/execution26/tests/exec-awaitable.test.cpp -*-C++-*-
22
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

44
#include <beman/execution26/detail/await_suspend_result.hpp>

src/beman/execution26/tests/exec-connect.pass.cpp renamed to tests/beman/execution26/exec-connect.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/beman/execution26/tests/exec-connect.pass.cpp -*-C++-*-
1+
// src/beman/execution26/tests/exec-connect.test.cpp -*-C++-*-
22
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

44
#include <beman/execution26/detail/connect.hpp>

src/beman/execution26/tests/exec-continues-on.pass.cpp renamed to tests/beman/execution26/exec-continues-on.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/beman/execution26/tests/exec-continues-on.pass.cpp -*-C++-*-
1+
// src/beman/execution26/tests/exec-continues-on.test.cpp -*-C++-*-
22
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

44
#include <beman/execution26/detail/continues_on.hpp>

src/beman/execution26/tests/exec-domain-default.pass.cpp renamed to tests/beman/execution26/exec-domain-default.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/beman/execution26/tests/exec-domain-default.pass.cpp -*-C++-*-
1+
// src/beman/execution26/tests/exec-domain-default.test.cpp -*-C++-*-
22
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

44
#include <beman/execution26/detail/default_domain.hpp>

src/beman/execution26/tests/exec-fwd-env.pass.cpp renamed to tests/beman/execution26/exec-fwd-env.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/beman/execution26/tests/exec-fwd-env.pass.cpp -*-C++-*-
1+
// src/beman/execution26/tests/exec-fwd-env.test.cpp -*-C++-*-
22
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

44
#include <beman/execution26/execution.hpp>

src/beman/execution26/tests/exec-general.pass.cpp renamed to tests/beman/execution26/exec-general.test.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
// src/beman/execution26/tests/exec-general.pass.cpp -*-C++-*-
2-
// ----------------------------------------------------------------------------
1+
// src/beman/execution26/tests/exec-general.test.cpp -*-C++-*-
32
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4-
// ----------------------------------------------------------------------------
53

64
#include <beman/execution26/execution.hpp>
75
#include <test/execution.hpp>

0 commit comments

Comments
 (0)