Tests: Add all tests from the coro creation repo

We went back and brought along all the tests we implemented while
we were building the new coro framework.
This commit is contained in:
2026-06-13 17:17:57 -04:00
parent 1763685c0e
commit a29c779f6e
11 changed files with 3199 additions and 28 deletions
+43 -26
View File
@@ -1,37 +1,54 @@
add_executable(spinscale_env_kv_store_tests
add_library(spinscale_test_support STATIC
support/threadHarness.cpp
)
target_include_directories(spinscale_test_support PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_link_libraries(spinscale_test_support PUBLIC
spinscale
gtest
)
function(add_spinscale_gtest target)
add_executable(${target} ${ARGN})
target_link_libraries(${target} PRIVATE
spinscale_test_support
gtest_main
)
add_dependencies(${target} gtest_main)
add_test(NAME ${target} COMMAND ${target})
endfunction()
add_spinscale_gtest(spinscale_env_kv_store_tests
env_kv_store_test.cpp
)
target_link_libraries(spinscale_env_kv_store_tests PRIVATE
spinscale
gtest_main
)
add_dependencies(spinscale_env_kv_store_tests gtest_main)
add_test(NAME spinscale_env_kv_store_tests
COMMAND spinscale_env_kv_store_tests)
add_executable(qutex_tests
add_spinscale_gtest(qutex_tests
cps/qutex_tests.cpp
)
target_link_libraries(qutex_tests PRIVATE
spinscale
gtest_main
)
add_dependencies(qutex_tests gtest_main)
add_test(NAME qutex_tests COMMAND qutex_tests)
add_executable(nonViralTaskNursery_tests
add_spinscale_gtest(nonViralTaskNursery_tests
co/nonViralTaskNursery_tests.cpp
)
target_link_libraries(nonViralTaskNursery_tests PRIVATE
spinscale
gtest_main
add_spinscale_gtest(co_viral_non_posting_tests
co/viral_non_posting_tests.cpp
)
add_dependencies(nonViralTaskNursery_tests gtest_main)
add_test(NAME nonViralTaskNursery_tests
COMMAND nonViralTaskNursery_tests)
add_spinscale_gtest(co_posting_cross_thread_tests
co/posting_cross_thread_tests.cpp
)
add_spinscale_gtest(co_group_edge_tests
co/group_edge_tests.cpp
)
add_spinscale_gtest(co_group_timer_tests
co/group_timer_tests.cpp
)
add_spinscale_gtest(co_component_continuation_tests
co/component_continuation_tests.cpp
)