Skip to content

Commit

Permalink
link to test is not optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern committed Oct 23, 2023
1 parent 16f8388 commit abfff39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 1 addition & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ add_executable(boost_cobalt_basic_tests

target_link_libraries(boost_cobalt_main Boost::cobalt)
target_link_libraries(boost_cobalt_main_compile Boost::cobalt)
target_link_libraries(boost_cobalt_basic_tests Boost::cobalt)

if (TARGET Boost::unit_test_framework)
target_link_libraries(boost_cobalt_basic_tests Boost::unit_test_framework)
endif()
target_link_libraries(boost_cobalt_basic_tests Boost::cobalt Boost::unit_test_framework)

add_test(NAME boost_cobalt_main COMMAND boost_cobalt_main)
add_test(NAME boost_cobalt_basic_tests COMMAND boost_cobalt_basic_tests)
Expand Down
2 changes: 1 addition & 1 deletion test/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ CO_TEST_CASE(stop)
while (g)
co_await g;

auto gg =std::move(g);
auto gg = std::move(g);
}

cobalt::generator<int, int> eager()
Expand Down
3 changes: 2 additions & 1 deletion test/test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ static ::boost::cobalt::task<void> Function##_impl()
struct stop
{
bool await_ready() {return false;}
void await_suspend(std::coroutine_handle<> h) { boost::cobalt::detail::self_destroy(h); }
template<typename Promise>
void await_suspend(std::coroutine_handle<Promise> h) { boost::cobalt::detail::self_destroy(h); }
void await_resume() {}
};

Expand Down

0 comments on commit abfff39

Please sign in to comment.